ADTast-experimental
Last change
on this file since 0e398ad was
f2f595d7,
checked in by Andrew Beach <ajbeach@…>, 21 months ago
|
RunParser? now uses AST for its interface everywhere. (Works because LinkageSpec::Spec and ast::Linkage::Spec have the same layout.)
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2018 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 | // RunParser.hpp -- External interface to the parser. |
---|
8 | // |
---|
9 | // Author : Andrew Beach |
---|
10 | // Created On : Mon Dec 19 10:42:00 2022 |
---|
11 | // Last Modified By : Andrew Beach |
---|
12 | // Last Modified On : Thr Feb 16 10:08:00 2023 |
---|
13 | // Update Count : 2 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <iosfwd> // for ostream |
---|
19 | |
---|
20 | #include "AST/LinkageSpec.hpp" // for Spec |
---|
21 | namespace ast { |
---|
22 | class TranslationUnit; |
---|
23 | } |
---|
24 | |
---|
25 | // The Parser does not have an enclosing namespace. |
---|
26 | |
---|
27 | /// Parse the contents of the input file, setting the initial linkage to the |
---|
28 | /// value provided. Results are saved to the internal accumulator. |
---|
29 | /// The input file is closed when complete. Exits instead of returning on |
---|
30 | /// error or if alwaysExit is true. |
---|
31 | void parse( FILE * input, ast::Linkage::Spec linkage, bool alwaysExit = false ); |
---|
32 | |
---|
33 | /// Drain the internal accumulator of parsed code and build a translation |
---|
34 | /// unit from it. |
---|
35 | ast::TranslationUnit buildUnit(void); |
---|
36 | |
---|
37 | // Local Variables: // |
---|
38 | // tab-width: 4 // |
---|
39 | // mode: c++ // |
---|
40 | // compile-command: "make install" // |
---|
41 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.