Enabling semantic checks in ParserBuilder
authorChristopher L. Conway <christopherleeconway@gmail.com>
Wed, 20 Oct 2010 21:49:22 +0000 (21:49 +0000)
committerChristopher L. Conway <christopherleeconway@gmail.com>
Wed, 20 Oct 2010 21:49:22 +0000 (21:49 +0000)
src/parser/parser_builder.cpp

index dcc052c3af1ebc7458334004467c37551263fb09..31f402df10c26e59d518ec6bf57c4203c2bc21ae 100644 (file)
@@ -95,6 +95,12 @@ Parser *ParserBuilder::build() throw (InputStreamException,AssertionException) {
     parser = new Parser(&d_exprManager, input, d_strictMode);
   }
 
+  if( d_checksEnabled ) {
+    parser->enableChecks();
+  } else {
+    parser->disableChecks();
+  }
+
   return parser;
 }