YAy PEG: Analyze grammar if debug mode is enabled
@@ -53,12 +53,14 @@ int addToKeySet (KeySet & keySet, Key & parent, string const & filename)
State state;
+#if DEBUG
// Check grammar for problematic code
if (analyze<yaml> () != 0)
{
throw runtime_error ("PEGTLs analyze function found problems while checking the top level grammar rule `yaml`!");
return -1;
}
+#endif
file_input<> input{ filename };
/* For detailed debugging information, please use the control class `tracer` instead of `normal`. */
