You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Target language: Java (default), Python3, CSharp, JavaScript, TypeScript, Go, Cpp, Swift, Dart, PHP. Use **-D**_option_**=**_value_ to override any grammar-level option.
49
49
50
50
**-package**_name_
51
51
> Package or namespace for generated code
@@ -83,6 +83,12 @@ Generate parsers from grammar files
83
83
**-Xlog**
84
84
> Create detailed log file (antlr-timestamp.log)
85
85
86
+
**-Xexact-output-dir**
87
+
> Place all output directly into **-o** directory regardless of paths or package structure
88
+
89
+
**-XdbgST**
90
+
> Launch StringTemplate visualizer on generated code
91
+
86
92
# DESCRIPTION
87
93
88
94
**ANTLR** (ANother Tool for Language Recognition) is a parser generator that creates lexers, parsers, and tree walkers from grammar files. It generates code that can read, process, and translate structured text or binary data.
> Execute the command with a mostly empty environment, clearing inherited environment variables.
31
47
32
48
**-l**
33
-
> Pass command as login shell
49
+
> Place a dash at the beginning of argv[0], causing the command to behave as a login shell.
34
50
35
51
**-a**_name_
36
-
> Pass name as argv[0] to command
52
+
> Pass _name_ as argv[0] to the executed command instead of the actual command name.
37
53
38
54
# DESCRIPTION
39
55
40
56
**exec** replaces the current shell process with the specified command without creating a child process. When exec completes, the shell session ends because the shell process no longer exists.
41
57
42
-
Built-in shell command commonly used in shell scripts and wrapper scripts.
58
+
If no command is specified but redirections are provided, the redirections take effect in the current shell. This allows redirecting stdin, stdout, or stderr for all subsequent commands, and opening or closing arbitrary file descriptors.
59
+
60
+
If the command cannot be executed, a non-interactive shell exits unless the **execfail** shell option is set. An interactive shell does not exit if exec fails.
43
61
44
62
# CAVEATS
45
63
46
-
Shell built-in command. The shell terminates after exec completes. File descriptors can be redirected before exec. Used in init scripts and process management.
64
+
Shell built-in command. The shell terminates after exec completes, so any commands after exec in a script will not run. File descriptor redirections without a command persist in the current shell. Behavior may vary slightly between bash, zsh, and other POSIX shells.
0 commit comments