Compiler
Operation
-
Preprocessor/Parser
Description
The environment variable remains set until you reboot the system
or
reset the
variable
by
entering:
DOS:
set
C-DIR=
VMS:
deassign
C-DIR
UNIX:
setenv
C-DIR
" "
MPW:
unset
C-DIR
3.2
Parser
(gspcc)
Description
The second step in compiling a TMS3401 0 C program
is
invoking the C par-
ser.
The parser reads the modified source file produced
by
the preprocessor,
parses the
file, checks the syntax, and produces
an
intermediate file that can
be
used
as
input
for the code generator.
(Note
that the
input
file can also be
a C source
file that has
not
been preprocessed.) Figure
3-3
illustrates this
process.
Figure
3-3.
Input
and
Output
Files
for
the
C
Parser
3.2.1
Invoking
the
Parser
3-6
To invoke the parser, enter:
gspcc
[input
file
[output
file}}
[options}
gspcc
is
the command that invokes the parser.
input
file names the modified C source file that the parser uses
as
input.
If
you
don't
supply
an
extension, the parser assumes that the
extension is
.cpp.
If
you
don't
specify
an
input
file, the parser
will
prompt you
for
one.
output
file names the intermediate file that the parser creates.
If
you
don't
supply a filename
for
the
output
file, the parser uses the
input
filename
with
an
extension
of
.if.