diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-05-12 19:57:23 -0700 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2021-05-17 12:19:20 -0700 |
commit | 6e6d2b59538a010b61434387498afa594434cfa9 (patch) | |
tree | 5e142000fb2a6332517408b562d3679e2ee74720 /src/parser/parser.h | |
parent | 68bc8bd1a36ac842708c471ba4b724c1569ea308 (diff) |
Add new interface for parsing inputs
This commit introduces the `InputParser` class, which is now the main
interface for retrieving commands and expressions from parsers for a
given input. The idea is that a `Parser` can be used to parse multiple
inputs (e.g., in the interactive shell) and that the
commands/expressions in each input can be retrieved using an
`InputParser`.
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r-- | src/parser/parser.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h index a7674ea63..a22b24a0c 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -252,18 +252,11 @@ class CVC5_EXPORT Parser api::Solver* getSolver() const; /** Get the associated input. */ - Input* getInput() const { return d_input.get(); } + Input* getInput() const { return d_input; } /** Get unresolved sorts */ inline std::set<api::Sort>& getUnresolvedSorts() { return d_unresolved; } - /** Deletes and replaces the current parser input. */ - void setInput(Input* input) { - d_input.reset(input); - d_input->setParser(*this); - d_done = false; - } - /** * Check if we are done -- either the end of input has been reached, or some * error has been encountered. |