d_exprManager = exprManager;
d_checksEnabled = true;
d_strictMode = false;
+ d_canIncludeFile = true;
d_mmap = false;
d_parseOnly = false;
}
parser->disableChecks();
}
+ if( d_canIncludeFile ) {
+ parser->allowIncludeFile();
+ } else {
+ parser->disallowIncludeFile();
+ }
+
return parser;
}
.withMmap(options[options::memoryMap])
.withChecks(options[options::semanticChecks])
.withStrictMode(options[options::strictParsing])
- .withParseOnly(options[options::parseOnly]);
+ .withParseOnly(options[options::parseOnly])
+ .withIncludeFile(options[options::canIncludeFile]);
}
ParserBuilder& ParserBuilder::withStrictMode(bool flag) {
return *this;
}
+ParserBuilder& ParserBuilder::withIncludeFile(bool flag) {
+ d_canIncludeFile = flag;
+ return *this;
+}
+
ParserBuilder& ParserBuilder::withStreamInput(std::istream& input) {
d_inputType = STREAM_INPUT;
d_streamInput = &input;