diff options
Diffstat (limited to 'src/parser/parser.h')
-rw-r--r-- | src/parser/parser.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/parser/parser.h b/src/parser/parser.h index f56ec03ac..25d7f2cd1 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -113,6 +113,8 @@ class CVC4_PUBLIC Parser { /** Are semantic checks enabled during parsing? */ bool d_checksEnabled; + /** Are we parsing in strict mode? */ + bool d_strictMode; /** Lookup a symbol in the given namespace. */ Expr getSymbol(const std::string& var_name, SymbolType type); @@ -158,10 +160,18 @@ public: } /** Enable semantic checks during parsing. */ - void enableChecks(); + void enableChecks() { d_checksEnabled = true; } /** Disable semantic checks during parsing. Disabling checks may lead to crashes on bad inputs. */ - void disableChecks(); + void disableChecks() { d_checksEnabled = false; } + + /** Enable strict parsing, according to the language standards. */ + void enableStrictMode() { d_strictMode = true; } + + /** Disable strict parsing. Allows certain syntactic infelicities to pass without comment. */ + void disableStrictMode() { d_strictMode = false; } + + bool strictModeEnabled() { return d_strictMode; } /** Get the name of the input file. */ /* |