(self)
Run command.
Run command.
Run command .
def run(self) -> None:
        """Run command."""
        root_dir = abspath(dirname(__file__))
        project_root = abspath(dirname(basename(__file__)))
        for grammar in [
            "hydra/grammar/OverrideLexer.g4",
            "hydra/grammar/OverrideParser.g4",
        ]:
            command = [
                "java",
                "-jar",
                join(root_dir, "bin/antlr-4.8-complete.jar"),
                "-Dlanguage=Python3",
                "-o",
                join(project_root, "hydra/grammar/gen/"),
                "-Xexact-output-dir",
                "-visitor",
                join(project_root, grammar),
            ]

            self.announce(
                f"Generating parser for Python3: {command}", level=distutils.log.INFO
            )

            subprocess.check_call(command)
def run ( self ) -> None : root_dir = abspath ( dirname ( __file__ ) ) project_root = abspath ( dirname ( basename ( __file__ ) ) ) for grammar in [ "hydra/grammar/OverrideLexer.g4" , "hydra/grammar/OverrideParser.g4" , ] : command = [ "java" , "-jar" , join ( root_dir , "bin/antlr-4.8-complete.jar" ) , "-Dlanguage=Python3" , "-o" , join ( project_root , "hydra/grammar/gen/" ) , "-Xexact-output-dir" , "-visitor" , join ( project_root , grammar ) , ] self . announce ( f"Generating parser for Python3: {command}" , level = distutils . log . INFO ) subprocess . check_call ( command )