Provided by: iraf-dev_2.18.1-2_amd64 bug

NAME

       xyacc - SPP modified yacc compiler compiler [IRAF]

SYNOPSIS

       xyacc [options] file

OPTIONS

       -b file_prefix
              Specify a file_prefix for output files

       -d     Also produce a header file y.tab.h.

       -l     Don't generate '#line' directives

       -P parser
              Specify parser file (default boot$xyacc/yaccpar.x)

       -Q(y/n)
              Flag  for  version stamping. The -Qy option puts the version stamping information in y.tab.c. This
              allows you to know what version of yacc built the file. The -Qn option  (the  default)  writes  no
              version information.

       -t     Compiles runtime debugging code by default.

       -v     Prepares  the  file  y.output,  which contains a description of the parsing tables and a report on
              conflicts generated by ambiguities in the grammar.

       -V     Output version information and exit

       -Y dir Specify location of yaccpar.x (default boot$xyacc).

DESCRIPTION

       The yacc command converts a context-free grammar into a  set  of  tables  for  a  simple  automaton  that
       executes  an LALR(1) parsing algorithm. The grammar can be ambiguous. Specified precedence rules are used
       to break ambiguities.

       This is a version of yacc that has been modified to produce SPP language parsers.  For the most part,  it
       should follow the operation of standard yacc, with the differences noted below.

       Input files should follow the yacc convention of ending in .y.

DIFFERENCES

       (1)    The  Yacc  input syntax is unmodified, except that the comment convention is now as in SPP, rather
              than C (i.e., use #, rather than /*..*/).  All defines, actions, etc. are of course given  in  the
              SPP language.

       (2)    The  Yacc  output  file  is  "ytab.x",  rather  than "y.tab.c".  The token defs file "y.tab.h" now
              contains SPP  defines,  rather  than  C  #defines.   The  states  file  "y.output"  is  completely
              unmodified.

       (3)    The  global  declarations  section  %{  .. %} had to be changed somewhat because SPP does not have
              global variables.  The section is now divided into two  subsections.   The  first  is  for  global
              defines,  includes,  etc.  which  go  into the header area of the ytab.x file.  Then follows a %L,
              telling Yacc that the local declarations for the parser procedure  follow.   This  second  section
              should  contain  variable  and  function declarations required for the user supplied actions (code
              fragments to be executed when a rule of the grammar is recognized) in the yyparse procedure.

       (4)    The global declarations section MUST contain the following two defines:

              YYMAXDEPTH Depth of the parser stacks; determines the maximum complexity of a  language  construct
              which can be parsed.  A typical value is 150.

              YYOPLEN  The  length, in struct units, of a token operand value structure.  You define the operand
              structure to be whatever you wish; all the parser needs to know is how big  an  element  is.   The
              lexical  analyzer  and  the  actions,  both  of  which  are  supplied by the user, use the operand
              structure for communications.  Operand structures are always referred to by a Mem pointer.

SEE ALSO

       yacc(1), xpp(1), rpp(1).

AUTHOR

       This manual page was written by Zed Pobre <zed@debian.org>, for the Debian GNU/Linux system (but  may  be
       used by others).  It includes text from the README file for xyacc in the IRAF sources.

IRAF 2.17                                           June 2021                                           XYACC(1)