-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMANPAGE
85 lines (81 loc) · 3.61 KB
/
MANPAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.\" Manpage for mewa.
.\" Contact [email protected].
.TH man 1 "25 May 2021" "0.4" "mewa man page"
.SH NAME
.B mewa
\- compiler compiler
.SH SYNOPSIS
.B mewa
[OPTION]... INPUTFILE
.SH DESCRIPTION
.PP
.B mewa
is a compiler compiler that builds a
.BR Lua
module implementing a compiler described as a LALR(1) grammar in the file \fIINPUTFILE\fR attributed with
.BR Lua
calls implementing the type system and the code generation.
.TP
\fB\-h\fR, \fB\--help\fR
Print this usage.
.TP
\fB\-v\fR, \fB\--version\fR
Print the current version of
.B mewa
.TP
\fB\-V\fR, \fB\--verbose\fR
Verbose debug output to stderr.
.TP
\fB\-g\fR, \fB\--generate-compiler\fR
Generate a compiler as a
.BR Lua
module described by the grammar in the input file.
.TP
\fB\-s\fR, \fB\--generate-template\fR
Generate a template for your
.BR Lua
module implementing the type system.
Extract all
.BR Lua
function calls from the grammar and prints their empty implementation stubs to the output. No debug output is provided. Be careful using this option. It is only useful after the initial definition of the grammar of your language. It overwrites previous definitions without merging with your edits in a previously generated version.
.TP
\fB\-l\fR, \fB\--generate-language\fR
Generate a
.BR Lua
table with the language description parsed for
.BR Lua
scripts generating descriptions for interfacing with other tools.
.TP
\fB\-o\fR, \fB\--output=\fR \fIfile\fR
Write the output (parsing tables) to \fIfile\fR instead of stdout.
.TP
\fB\-b\fR, \fB\--luabin=\fR \fIluapath\fR
Specify \fIluapath\fR as path of the
.BR Lua
interpreter in the header of generated scripts. Default is "\fI/usr/bin/lua\fR".
.TP
\fB\-d\fR, \fB\--dbgout=\fR \fIfile\fR
Write the verbose debug output (productions,states,functions,etc.) to \fIfile\fR instead of stdout.
.TP
\fB\-t\fR, \fB\--template=\fR \fIfile\fR
Use \fIfile\fR content as template for the generated
.BR Lua
module (option -g/--generate-compiler). The template contains the substitutes \fI%typesystem%\fR (name of the module implementing the type system), \fI%automaton%\fR (
.BR
Lua
table with the generated automaton of the compiler), \fI%language%\fR (name of the language), \fI%luabin%\fR (path of the lua program executing the script, specified by option -b/--luabin) and \fI%cmdline%\fR (name of the module implementing the command-line parser).
.SH AUTHOR
Written by Patrick P. Frey ([email protected])
.SH REPORTING BUGS
Report bugs on <https://github.com/patrickfrey/mewa/issues>
.SH COPYRIGHT
Copyright \(co 2020 Patrick P. Frey.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.SH SEE ALSO
lua(1)
.PP
.br
Full documentation and examples at: <https://github.com/patrickfrey/mewa/blob/master/README.md>
.br