2002-08-23 Nick Drochak <ndrochak@gol.com>
[mono.git] / mcs / jay / jay.1
1 .\" Copyright (c) 1989, 1990 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Robert Paul Corbett.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\"    must display the following acknowledgement:
17 .\"     This product includes software developed by the University of
18 .\"     California, Berkeley and its contributors.
19 .\" 4. Neither the name of the University nor the names of its contributors
20 .\"    may be used to endorse or promote products derived from this software
21 .\"    without specific prior written permission.
22 .\"
23 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" SUCH DAMAGE.
34 .\"
35 .\"     @(#)yacc.1      5.8 (Berkeley) 5/24/93
36 .\"
37 .TH JAY 1 "May 24, 1993 / July 8, 1998"
38 .UC 6
39 .SH NAME
40 jay \- an LALR(1) parser generator for Java and C#
41 .SH SYNOPSIS
42 .B jay [ -tv ] [ -c ] [ -b
43 .I file_prefix
44 .B ] [ -V
45 .I yyValue
46 .B ]
47 .I filename
48 .B <
49 .I skeleton
50 .SH DESCRIPTION
51 .I Jay
52 reads the grammar specification in the file
53 .I filename
54 and generates an LR(1) parser for it.
55 The parsers consist of a set of LALR(1) parsing tables and a driver routine
56 from the file
57 .I skeleton
58 written in the Java programming language.
59 .I Jay
60 writes the parse tables and the driver routine to standard output.
61 .PP
62 The following options are available:
63 .RS
64 .TP
65 \fB-b \fIfile_prefix\fR
66 The
67 .B -b
68 option changes the prefix prepended to the output file names to
69 the string denoted by
70 .IR file_prefix.
71 The default prefix is the character
72 .IR y.
73 .TP
74 .B -c
75 The
76 .B -c 
77 option makes jay generate C# code instead of the default Java.
78 .TP
79 .B -t
80 The
81 .B -t
82 option arranges for
83 debugging information to be incorporated in the compiled code.
84 .TP
85 .B -v
86 The
87 .B -v
88 option causes a human-readable description of the generated parser to
89 be written to the file
90 .IR y.output.
91 .RE
92 .PP
93 If the environment variable TMPDIR is set, the string denoted by
94 TMPDIR will be used as the name of the directory where the temporary
95 files are created.
96 .SH FILES
97 .IR skeleton
98 .br
99 .IR y.output
100 .br
101 .IR /tmp/yacc.aXXXXXX
102 .br
103 .IR /tmp/yacc.tXXXXXX
104 .br
105 .IR /tmp/yacc.uXXXXXX
106 .SH DIAGNOSTICS
107 If there are rules that are never reduced, the number of such rules is
108 reported on standard error.
109 If there are any LALR(1) conflicts, the number of conflicts is reported
110 on standard error.
111 .SH HISTORY
112 .I Jay
113 is derived from Berkeley
114 .I yacc .
115 Input conventions closely follow those of
116 .I yacc ;
117 for details,
118 consult the parser
119 .I skeleton
120 file and the commented example included with the sources.