summaryrefslogtreecommitdiff
path: root/man/zubr.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/zubr.1')
-rw-r--r--man/zubr.1106
1 files changed, 106 insertions, 0 deletions
diff --git a/man/zubr.1 b/man/zubr.1
new file mode 100644
index 0000000..8c7bf73
--- /dev/null
+++ b/man/zubr.1
@@ -0,0 +1,106 @@
+.TH ZUBR 1 "September 2026" "ZUBR 4.1.0" "User Commands"
+.SH NAME
+zubr \- LALR(1) parser generator
+.SH SYNOPSIS
+.B zubr
+.RI [ options ] " input-file"
+.SH DESCRIPTION
+.B ZUBR
+is an LALR(1) parser generator. It reads a grammar specification and
+produces C parser source. Input and output text files use UTF-8; text is
+represented internally by ZUBR as UCS-2 through LibMPUIO.
+.PP
+Exactly one input grammar file is required.
+.SH OPTIONS
+.TP
+.BI -b prefix
+Set the prefix used for generated output files. The argument may be joined
+to the option or supplied as the next command-line argument.
+.TP
+.B -d
+Produce the generated token/header file.
+.TP
+.B -l
+Omit generated \fB#line\fP directives.
+.TP
+.B -p
+Use the \fB.cpp\fP suffix for the generated code file. This selects the
+filename suffix only; it does not make ZUBR generate C++ code.
+.TP
+.B -r
+Split read-only parser tables from parser code.
+.TP
+.B -s
+Use static storage where applicable in generated code.
+.TP
+.B -t
+Include parser debugging support in generated code.
+.TP
+.B -v
+Produce the parser description/output file.
+.TP
+.BI -B name
+Use \fIname\fP as the prefix for generated global parser names.
+.TP
+.BI -C filename
+Set the generated code filename.
+.TP
+.BI -D filename
+Set the generated header filename.
+.TP
+.BI -I filename
+Use an external include file for generated token definitions.
+.TP
+.BI -L funcname
+Use \fIfuncname\fP as the lexer function name called by the generated parser.
+.TP
+.BI -P funcname
+Use \fIfuncname\fP as the generated parser function name.
+.TP
+.BI -R filename
+Split read-only tables from parser code and use \fIfilename\fP for the code
+part.
+.TP
+.BI -V filename
+Set the parser description/output filename.
+.TP
+.BI -o filename
+Set the generated code filename. The argument may be joined to the option
+or supplied as the next command-line argument.
+.TP
+.B --help
+Display command-line help and exit.
+.TP
+.B --version
+Display version information and exit.
+.SH NOTES
+The short flag options
+.BR -d ,
+.BR -l ,
+.BR -p ,
+.BR -r ,
+.BR -s ,
+.BR -t
+and
+.B -v
+may be grouped.
+.PP
+Options taking optional filenames or names in the historical ZUBR syntax,
+such as
+.BR -C ,
+.BR -D ,
+.BR -R
+and
+.BR -V ,
+accept their value joined directly to the option letter. See
+.B --help
+for the concise command-line summary of the installed version.
+.SH FILES
+.TP
+.I input-file
+UTF-8 grammar specification read by ZUBR.
+.SH SEE ALSO
+.BR yacc (1),
+.BR bison (1)
+.SH AUTHOR
+Andrey V. Kosteltsev.