charmoniumQ / antlr4-python-grun

Pure-Python replacement of `org.antlr.v4.gui.TestRig` (aka `grun`)
MIT License
5 stars 0 forks source link

any idea what's going on? #2

Open aiskingstud opened 8 months ago

aiskingstud commented 8 months ago

I tried: pygrun parse ./barebones.g test

And got this output:

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Program Files\Python39\Scripts\pygrun.exe__main.py", line 7, in File "C:\Program Files\Python39\Lib\site-packages\antlr4_grun\cli.py", line 58, in main app() File "C:\Program Files\Python39\Lib\site-packages\typer\main.py", line 214, in call return get_command(self)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\click\core.py", line 783, in invoke return callback(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\typer\main.py", line 532, in wrapper return callback(use_params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\antlr4_grun\cli.py", line 53, in parse root = lib.parse(grammar, initial_rule, input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\antlr4_grun\lib.py", line 145, in parse Lexer, Parser = get_lexer_parser(grammar) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\antlr4_grun\lib.py", line 111, in get_lexer_parser build_dir = compile(grammar_path) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\site-packages\antlr4_grun\lib.py", line 93, in compile subprocess.run( File "C:\Program Files\Python39\Lib\subprocess.py", line 548, in run with Popen(popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python39\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python39\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified

charmoniumQ commented 8 months ago

Do you have Java installed? Test this by going to CMD.EXE and typing java --version.