code: public void execute () throws MojoExecutionException, MojoFailureException
    {
      final GrammarInfo [] grammarInfos = scanForGrammars ();
  
      if (grammarInfos == null)
      {
        getLog ().info ("Skipping non-existing source directory: " + getSourceDirectory ());
        return;
      }
      else
        if (grammarInfos.length <= 0)
        {
          getLog ().info ("Skipping - all parsers are up to date");
        }
        else
        {
          determineNonGeneratedSourceRoots ();
  
          if (StringUtils.isEmpty (grammarEncoding))
          {
            getLog ().warn ("File encoding for grammars has not been configured, using platform default encoding, i.e. build is platform dependent!");
          }
          if (StringUtils.isEmpty (outputEncoding))
          {
            getLog ().warn ("File encoding for output has not been configured, defaulting to UTF-8!");
          }
  
          for (final GrammarInfo grammarInfo : grammarInfos)
          {
            processGrammar (grammarInfo);
          }
  
          getLog ().info ("Processed " + grammarInfos.length + " grammar" + (grammarInfos.length != 1 ? "s" : ""));
        }
  
      final Collection <File> compileSourceRoots = new LinkedHashSet <> (Arrays.asList (getCompileSourceRoots ()));
      for (final File file : compileSourceRoots)
      {
        addSourceRoot (file);
      }
    }
docs: Execute the tool.
  
  @throws MojoExecutionException
  If the invocation of the tool failed.
  @throws MojoFailureException
  If the tool reported a non-zero exit code.