diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-06-07 15:23:36 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-06-07 15:23:36 -0400 |
commit | 931b5641dfffcd3779239e014406aa057e21e0f7 (patch) | |
tree | cc37b63036dc8cd88af2c8cb1ac4511d0befbf17 /src/parser/parser.h | |
parent | 6a329424666b4c4a6869dd7bcf9e7cfd69a219f5 (diff) |
Allow disabling include-file feature
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r-- | src/parser/parser.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h index 4f943a0b5..b4e79b427 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -158,6 +158,12 @@ class CVC4_PUBLIC Parser { /** Are we only parsing? */ bool d_parseOnly; + /** + * Can we include files? (Set to false for security purposes in + * e.g. the online version.) + */ + bool d_canIncludeFile; + /** The set of operators available in the current logic. */ std::set<Kind> d_logicOperators; @@ -252,6 +258,10 @@ public: bool strictModeEnabled() { return d_strictMode; } + bool allowIncludeFile() { d_canIncludeFile = true; } + bool disallowIncludeFile() { d_canIncludeFile = false; } + bool canIncludeFile() const { return d_canIncludeFile; } + /** * Returns a variable, given a name. * |