1treecc(1) treecc(1)
2
3
4
6 treecc - tree compiler-compiler
7
9 treecc [ options ] input ...
10
12 Treecc converts input files in the treecc syntax into source code that
13 permits creating and walking abstract syntax trees. It is intended for
14 use in developing compilers, in concert with existing tools such as
15 lex(1) and yacc(1). The treecc syntax is described in the treecc tex‐
16 info topic.
17
19 -o file, --output file
20 Set the name of the output file. If this option is not sup‐
21 plied, then the name of the first input file will be used, with
22 its extension changed to ".c". If the input is stdin, the
23 default output file is "yy_tree.c".
24
25 This option may be overridden using the "%output" keyword in the
26 input files.
27
28 -h file, --header file
29 Set the name of the header output file. This is only used for
30 the C and C++ languages. If this option is not supplied, then
31 the name of the output file will be used, with its extension
32 changed to ".h". If the input is stdin, the default header out‐
33 put file is "yy_tree.h".
34
35 This option may be overriden using the "%header" keyword in the
36 input files.
37
38 If this option is used with a language that does not require
39 headers, it will be ignored.
40
41 -d dir, --output-dir dir
42 Set the name of the Java output directory. This is only used
43 for the Java language. If this option is not supplied, then the
44 directory corresponding to the first input file is used. If the
45 input is stdin, the default is the current directory.
46
47 This option may be overriden using the "%outdir" keyword in the
48 input files.
49
50 If this option is used with a language other than Java, it will
51 be ignored.
52
53 -e ext, --extension ext
54 Change the default output file extension to ext, instead of
55 ".c". The value ext can have a leading dot, but this is not
56 required.
57
58 -f, --force-create
59 Treecc attempts to optimise the creation of output files so that
60 they are only modified if a non-trivial change has occurred in
61 the input. This can reduce the number of source code recompiles
62 when treecc is used in combination with make(1).
63
64 This option forces the output files to be created, even if they
65 are the same as existing files with the same name.
66
67 The directive "%option force" can be used in the input files to
68 achieve the same effect as this option.
69
70 -O opt, --option opt
71 Set a treecc option value. This is a command-line version of
72 the "%option" keyword in the input files.
73
74 -n, --no-output
75 Suppress the generation of output files. Treecc parses the
76 input files, checks for errors, and then stops.
77
78 --help Print a usage message for the treecc program.
79
80 -v, --version
81 Print the version of the treecc program.
82
83 -- Marks the end of the command-line options, and the beginning of
84 the input filenames. You may need to use this if your filename
85 begins with '-'. e.g. "treecc -- -input.tc". This is not
86 needed if the input is stdin: "treecc -" is perfectly valid.
87
89 Written by Southern Storm Software, Pty Ltd.
90
91 http://www.southern-storm.com.au/
92
94 lex(1), yacc(1), make(1)
95
97 Exit status is 1 if an error occurred while processing the input. Oth‐
98 erwise the exit status is 0.
99
100
101
102Southern Storm Software 19 June 2001 treecc(1)