
/*  A Bison parser, made from mit2mot.y with Bison version GNU Bison version 1.22
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	RETURN	258
#define	BLANK	259
#define	NUM	260
#define	REG	261
#define	IDENT	262
#define	LABEL	263
#define	IMED_ADDRESS	264
#define	COMMENT	265
#define	DIR	266
#define	DIR_FILL	267
#define	DIR_ALIGN	268
#define	DIR_SET	269
#define	MNEMO	270
#define	SIZE	271
#define	FEHLER	272
#define	NEG	273

#line 1 "mit2mot.y"

#include "mit2mot.config.h"
#define FALSE 0
#define TRUE 1
extern FILE *fd_out;
static void printcomment( const char *s );
static char *CalkRegisters ( long value );
static struct t_worte *KlammerAussenWeg ( struct t_worte *w );
static short PreDecrement = FALSE;
static int Modus=0;
#define DRAUSSEN 1
void SetDraussen(void) { Modus|=DRAUSSEN; }

#line 15 "mit2mot.y"
typedef union {
char *string;
struct t_number { char *string;
		  long value; } number;
struct t_worte *worte;
} YYSTYPE;

#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#ifndef const
#define const
#endif
#endif
#endif



#define	YYFINAL		148
#define	YYFLAG		-32768
#define	YYNTBASE	39

#define YYTRANSLATE(x) ((unsigned)(x) <= 273 ? yytranslate[x] : 54)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    24,     2,    34,     2,    27,    22,     2,    36,
    37,    25,    19,    18,    20,     2,    26,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    32,     2,    29,
     2,    28,     2,    35,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,    23,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    33,    21,    38,    30,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    31
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     6,     7,    12,    15,    17,    20,    22,    26,
    27,    28,    30,    32,    34,    38,    44,    50,    52,    56,
    63,    67,    73,    74,    77,    79,    81,    85,    87,    91,
    95,    97,    99,   102,   105,   108,   112,   116,   122,   129,
   138,   148,   157,   168,   180,   193,   208,   223,   232,   233,
   235,   237,   239,   241,   245,   249,   253,   257,   261,   264,
   268,   272,   276,   279,   283,   288,   292,   297
};

static const short yyrhs[] = {    41,
     0,    39,     3,    41,     0,     0,     1,     3,    40,    41,
     0,    42,    43,     0,    45,     0,     4,    44,     0,     8,
     0,     8,     4,    44,     0,     0,     0,    10,     0,    45,
     0,    15,     0,    15,     4,    49,     0,    15,     4,    50,
    18,     9,     0,    15,     4,     9,    18,    50,     0,    11,
     0,    11,     4,    47,     0,    12,     4,    52,    18,     5,
    46,     0,    13,     4,    47,     0,    14,     4,     7,    18,
    47,     0,     0,    18,    47,     0,    48,     0,    53,     0,
    53,    18,    47,     0,    50,     0,    50,    18,    49,     0,
    50,    32,    50,     0,     6,     0,    52,     0,    52,    16,
     0,    34,    52,     0,     6,    35,     0,     6,    35,    19,
     0,     6,    35,    20,     0,     6,    35,    36,    52,    37,
     0,     6,    35,    36,     6,    16,    37,     0,     6,    35,
    36,    52,    18,     6,    16,    37,     0,     6,    35,    36,
    52,    16,    18,     6,    16,    37,     0,     6,    35,    36,
     6,    16,    32,    52,    37,     0,     6,    35,    36,    52,
    18,     6,    16,    32,    52,    37,     0,     6,    35,    36,
    52,    16,    18,     6,    16,    32,    52,    37,     0,     6,
    35,    36,     6,    16,    32,    52,    37,    51,    36,    52,
    37,     0,     6,    35,    36,    52,    18,     6,    16,    32,
    52,    37,    51,    36,    52,    37,     0,     6,    35,    36,
    52,    37,    51,    36,     6,    16,    32,    52,    18,    52,
    37,     0,    50,    33,    34,    52,    32,    34,    52,    38,
     0,     0,    35,     0,    53,     0,     5,     0,     7,     0,
    53,    19,    53,     0,    53,    20,    53,     0,    53,    25,
    53,     0,    53,    26,    53,     0,    53,    27,    53,     0,
    20,    53,     0,    53,    22,    53,     0,    53,    21,    53,
     0,    53,    23,    53,     0,    30,    53,     0,    53,    28,
    53,     0,    53,    28,    28,    53,     0,    53,    29,    53,
     0,    53,    29,    29,    53,     0,    36,    53,    37,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
    70,    72,    73,    76,    78,    84,    86,    87,    88,    90,
    94,    99,   107,   108,   109,   110,   112,   117,   118,   119,
   130,   132,   138,   140,   145,   152,   154,   162,   164,   168,
   169,   170,   171,   172,   173,   175,   176,   178,   184,   186,
   191,   197,   200,   206,   213,   219,   226,   233,   239,   240,
   247,   251,   252,   253,   260,   267,   274,   281,   288,   293,
   300,   307,   314,   319,   326,   333,   340,   347
};

static const char * const yytname[] = {   "$","error","$illegal.","RETURN","BLANK",
"NUM","REG","IDENT","LABEL","IMED_ADDRESS","COMMENT","DIR","DIR_FILL","DIR_ALIGN",
"DIR_SET","MNEMO","SIZE","FEHLER","','","'+'","'-'","'|'","'&'","'^'","'!'",
"'*'","'/'","'%'","'>'","'<'","'~'","NEG","':'","'{'","'#'","'@'","'('","')'",
"'}'","GLOBAL_INPUT","@1","INPUT","LINE","PrintCOMMENT","INSTR","DIRECT","EXP_RST",
"EXP_LST","EXP_LST2","ADDR_LST","ADDR","AFFE","EXP","EXP2",""
};
#endif

static const short yyr1[] = {     0,
    39,    39,    40,    39,    41,    42,    42,    42,    42,    42,
    43,    43,    44,    44,    44,    44,    44,    45,    45,    45,
    45,    45,    46,    46,    47,    48,    48,    49,    49,    50,
    50,    50,    50,    50,    50,    50,    50,    50,    50,    50,
    50,    50,    50,    50,    50,    50,    50,    50,    51,    51,
    52,    53,    53,    53,    53,    53,    53,    53,    53,    53,
    53,    53,    53,    53,    53,    53,    53,    53
};

static const short yyr2[] = {     0,
     1,     3,     0,     4,     2,     1,     2,     1,     3,     0,
     0,     1,     1,     1,     3,     5,     5,     1,     3,     6,
     3,     5,     0,     2,     1,     1,     3,     1,     3,     3,
     1,     1,     2,     2,     2,     3,     3,     5,     6,     8,
     9,     8,    10,    11,    12,    14,    14,     8,     0,     1,
     1,     1,     1,     3,     3,     3,     3,     3,     2,     3,
     3,     3,     2,     3,     4,     3,     4,     3
};

static const short yydefact[] = {     0,
     0,     0,     8,    18,     0,     0,     0,     0,     1,    11,
     6,     3,    14,     7,    13,     0,     0,     0,     0,     0,
    10,    12,     5,    10,     0,     9,    52,    53,     0,     0,
     0,    19,    25,    26,     0,    51,    21,     0,     2,     4,
    31,     0,     0,    15,    28,    32,    59,    63,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,    35,     0,    34,     0,     0,     0,    33,    68,
    27,    54,    55,    61,    60,    62,    56,    57,    58,     0,
    64,     0,    66,    23,    22,    36,    37,     0,    17,    16,
    29,    28,    30,     0,    65,    67,     0,    20,     0,     0,
     0,     0,    24,     0,     0,     0,    38,     0,     0,    39,
     0,     0,    50,     0,     0,     0,     0,     0,     0,     0,
    42,     0,     0,    40,     0,    48,     0,     0,    41,     0,
     0,     0,     0,    43,     0,     0,    44,     0,     0,    45,
     0,     0,     0,     0,    46,    47,     0,     0
};

static const short yydefgoto[] = {     8,
    24,     9,    10,    23,    14,    11,    98,    32,    33,    91,
    92,   114,    46,    36
};

static const short yypact[] = {   163,
    14,    81,     5,    26,    27,    44,    57,    47,-32768,    55,
-32768,-32768,    59,-32768,-32768,    81,   121,   121,   121,    62,
   197,-32768,-32768,   197,    48,-32768,-32768,-32768,   121,   121,
   121,-32768,-32768,   160,    61,   171,-32768,    67,-32768,-32768,
    40,    68,   121,-32768,   -14,    88,-32768,-32768,   133,   121,
   121,   121,   121,   121,   121,   121,   121,   121,    83,   113,
    72,   121,    -8,    95,-32768,    53,    95,    78,-32768,-32768,
-32768,   191,   191,   119,   119,   119,-32768,-32768,-32768,   121,
-32768,   121,-32768,    98,-32768,-32768,-32768,   102,    -9,-32768,
-32768,   -12,    73,   121,-32768,-32768,   121,-32768,   105,   -11,
    95,   103,-32768,    -5,   109,   124,    63,   100,   121,-32768,
   130,   123,-32768,   101,   121,   128,   134,    19,   162,   131,
    63,    35,   121,-32768,   156,-32768,   104,   121,-32768,   147,
   170,   121,   158,    63,   121,   166,-32768,   168,   188,-32768,
   121,   121,   178,   184,-32768,-32768,   207,-32768
};

static const short yypgoto[] = {-32768,
-32768,    50,-32768,-32768,   206,     6,-32768,   -17,-32768,   198,
   -15,  -105,   -18,   -16
};


#define	YYLAST		223


static const short yytable[] = {    35,
    34,    37,    34,    66,   105,   101,   106,    15,    16,    45,
    86,    87,    47,    48,    49,   127,    12,    67,    68,    67,
    68,    15,    67,    68,    65,   107,   109,    88,   138,    17,
    18,   110,    71,    34,    72,    73,    74,    75,    76,    77,
    78,    79,    81,    83,    85,    34,   147,    19,    89,    21,
   123,    93,    27,    41,    28,   124,    42,    27,    41,    28,
    20,    90,    25,    95,    22,    96,   128,    29,    38,   100,
    39,   129,    29,    40,    63,   102,    84,    30,    61,   103,
    34,    43,    30,    31,    62,    64,    43,    27,    31,    28,
   116,     4,     5,     6,     7,    13,   120,   113,   -49,    27,
    41,    28,    29,    69,   130,    68,    27,    99,    28,   133,
    80,    94,    30,   136,    29,    97,   139,    27,    31,    28,
   104,    29,   143,   144,    30,    27,   111,    28,    43,   112,
    31,    30,    29,   115,   108,   117,   119,    31,   118,   132,
    29,    82,    30,    56,    57,    58,    59,    60,    31,   122,
    30,    51,    52,    53,    54,    55,    31,    56,    57,    58,
    59,    60,   -10,     1,   121,   -10,     2,   125,   126,    70,
     3,   131,   -10,     4,     5,     6,     7,    50,    51,    52,
    53,    54,    55,   134,    56,    57,    58,    59,    60,    51,
    52,    53,    54,    55,   137,    56,    57,    58,    59,    60,
     2,   135,   140,   141,     3,   142,   148,     4,     5,     6,
     7,    53,    54,    55,   145,    56,    57,    58,    59,    60,
   146,    26,    44
};

static const short yycheck[] = {    18,
    17,    19,    19,    18,    16,    18,    18,     2,     4,    25,
    19,    20,    29,    30,    31,   121,     3,    32,    33,    32,
    33,    16,    32,    33,    43,    37,    32,    36,   134,     4,
     4,    37,    50,    50,    51,    52,    53,    54,    55,    56,
    57,    58,    59,    60,    62,    62,     0,     4,    64,     3,
    32,    67,     5,     6,     7,    37,     9,     5,     6,     7,
     4,     9,     4,    80,    10,    82,    32,    20,     7,    88,
    21,    37,    20,    24,    35,    94,     5,    30,    18,    97,
    97,    34,    30,    36,    18,    18,    34,     5,    36,     7,
   109,    11,    12,    13,    14,    15,   115,    35,    36,     5,
     6,     7,    20,    16,   123,    33,     5,     6,     7,   128,
    28,    34,    30,   132,    20,    18,   135,     5,    36,     7,
    16,    20,   141,   142,    30,     5,    18,     7,    34,     6,
    36,    30,    20,    34,    32,     6,    36,    36,    16,    36,
    20,    29,    30,    25,    26,    27,    28,    29,    36,    16,
    30,    19,    20,    21,    22,    23,    36,    25,    26,    27,
    28,    29,     0,     1,    37,     3,     4,     6,    38,    37,
     8,    16,    10,    11,    12,    13,    14,    18,    19,    20,
    21,    22,    23,    37,    25,    26,    27,    28,    29,    19,
    20,    21,    22,    23,    37,    25,    26,    27,    28,    29,
     4,    32,    37,    36,     8,    18,     0,    11,    12,    13,
    14,    21,    22,    23,    37,    25,    26,    27,    28,    29,
    37,    16,    25
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/gnu/lib/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */


#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#define YYLEX		yylex(&yylval, &yylloc)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_bcopy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_bcopy (from, to, count)
     char *from;
     char *to;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_bcopy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 184 "/gnu/lib/bison.simple"
int
yyparse()
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 3:
#line 74 "mit2mot.y"
{ fprintf(fd_out,"parse error, can't convert -> %s <-\n",lexline()); ;
    break;}
case 6:
#line 85 "mit2mot.y"
{ fprintf(fd_out,"\t%s",yyvsp[0].string); ;
    break;}
case 7:
#line 86 "mit2mot.y"
{ fprintf(fd_out,"\t%s",yyvsp[0].string); ;
    break;}
case 8:
#line 87 "mit2mot.y"
{ fprintf(fd_out,"%s",yyvsp[0].string); ;
    break;}
case 9:
#line 89 "mit2mot.y"
{ fprintf(fd_out,"%s\t%s",yyvsp[-2].string,yyvsp[0].string); ;
    break;}
case 10:
#line 90 "mit2mot.y"
{ ; ;
    break;}
case 11:
#line 95 "mit2mot.y"
{ fprintf(fd_out,"\n");
			  lexnextline();
			  cprintfclear();
			  PreDecrement = FALSE; ;
    break;}
case 12:
#line 99 "mit2mot.y"
{ printcomment( yyvsp[0].string ); fprintf(fd_out,"\n");
			  lexnextline();
			  cprintfclear();
			  PreDecrement = FALSE; ;
    break;}
case 13:
#line 107 "mit2mot.y"
{ yyval.string = cprintf("%s",yyvsp[0].string); ;
    break;}
case 14:
#line 108 "mit2mot.y"
{ yyval.string = cprintf("%s",yyvsp[0].string); ;
    break;}
case 15:
#line 109 "mit2mot.y"
{ yyval.string = cprintf("%s\t%s",yyvsp[-2].string,yyvsp[0].string); ;
    break;}
case 16:
#line 110 "mit2mot.y"
{
                                  yyval.string = cprintf("%s\t%s,%s",yyvsp[-4].string,yyvsp[-2].string,CalkRegisters(yyvsp[0].number.value)); ;
    break;}
case 17:
#line 112 "mit2mot.y"
{
				  yyval.string = cprintf("%s\t%s,%s",yyvsp[-4].string,CalkRegisters(yyvsp[-2].number.value),yyvsp[0].string); ;
    break;}
case 18:
#line 117 "mit2mot.y"
{ yyval.string = cprintf("%s",yyvsp[0].string); ;
    break;}
case 19:
#line 118 "mit2mot.y"
{ yyval.string = cprintf("%stest\t%s",yyvsp[-2].string,yyvsp[0].string); ;
    break;}
case 20:
#line 119 "mit2mot.y"
{
	if (yyvsp[-1].number.value<1) 
           { yyerror("parse error");
           yyval.string = cprintf(";ERROR while converting fill-expression, size %d not allowed.\nERROR -> .fill\t%s,%s%s",(int)yyvsp[-1].number.value,yyvsp[-3].string,yyvsp[-1].number.string,yyvsp[0].string); }
	else if (yyvsp[-1].number.value<=1) yyval.string = cprintf("dcb.b\t%s%s",yyvsp[-3].string,yyvsp[0].string);
	else if (yyvsp[-1].number.value<=2) yyval.string = cprintf("dcb.w\t%s%s",yyvsp[-3].string,yyvsp[0].string);
	else if (yyvsp[-1].number.value<=4) yyval.string = cprintf("dcb.l\t%s%s",yyvsp[-3].string,yyvsp[0].string);
	else 
           { yyerror("parse error");
           yyval.string = cprintf(";ERROR while converting fill-expression, size %d not allowed.\nERROR -> .fill\t%s,%s%s",(int)yyvsp[-1].number.value,yyvsp[-3].string,yyvsp[-1].number.string,yyvsp[0].string); }
	;
    break;}
case 21:
#line 130 "mit2mot.y"
{
			yyval.string = cprintf("%s%s",yyvsp[-2].string,yyvsp[0].string ); ;
    break;}
case 22:
#line 132 "mit2mot.y"
{
			yyval.string = cprintf("\n%s\t%s\t%s",yyvsp[-2].string,yyvsp[-4].string,yyvsp[0].string); ;
    break;}
case 23:
#line 139 "mit2mot.y"
{ yyval.string = ""; ;
    break;}
case 24:
#line 140 "mit2mot.y"
{ yyval.string = cprintf(",%s",yyvsp[0].string); ;
    break;}
case 25:
#line 146 "mit2mot.y"
{ yyval.string = cprintf_worte( yyvsp[0].worte ); ;
    break;}
case 26:
#line 153 "mit2mot.y"
{ yyval.worte = KlammerAussenWeg( yyvsp[0].worte ); ;
    break;}
case 27:
#line 154 "mit2mot.y"
{ yyval.worte = contact_wort(KlammerAussenWeg(yyvsp[-2].worte),
				       contact_wort(create_wort(","),
						    create_wort(yyvsp[0].string)
						   )); ;
    break;}
case 28:
#line 163 "mit2mot.y"
{ yyval.string = yyvsp[0].string; ;
    break;}
case 29:
#line 164 "mit2mot.y"
{ yyval.string = cprintf("%s,%s",yyvsp[-2].string,yyvsp[0].string); ;
    break;}
case 30:
#line 168 "mit2mot.y"
{ yyval.string = cprintf("%s:%s",yyvsp[-2].string,yyvsp[0].string); ;
    break;}
case 31:
#line 169 "mit2mot.y"
{ yyval.string = yyvsp[0].string; ;
    break;}
case 32:
#line 170 "mit2mot.y"
{ yyval.string = yyvsp[0].string; ;
    break;}
case 33:
#line 171 "mit2mot.y"
{ yyval.string = cprintf("(%s).%s",yyvsp[-1].string,yyvsp[0].string); ;
    break;}
case 34:
#line 172 "mit2mot.y"
{ yyval.string = cprintf("#%s", yyvsp[0].string); ;
    break;}
case 35:
#line 173 "mit2mot.y"
{ yyval.string = cprintf("(%s)",yyvsp[-1].string); ;
    break;}
case 36:
#line 175 "mit2mot.y"
{ yyval.string = cprintf("(%s)+",yyvsp[-2].string); ;
    break;}
case 37:
#line 176 "mit2mot.y"
{ PreDecrement=TRUE; yyval.string = cprintf("-(%s)",yyvsp[-2].string); ;
    break;}
case 38:
#line 179 "mit2mot.y"
{ if (Modus&DRAUSSEN)
			    yyval.string = cprintf("%s(%s)",yyvsp[-1].string,yyvsp[-4].string);
			  else
			    yyval.string = cprintf("(%s,%s)",yyvsp[-1].string,yyvsp[-4].string); ;
    break;}
case 39:
#line 185 "mit2mot.y"
{ yyval.string = cprintf("(%s,%s.%s)",yyvsp[-5].string,yyvsp[-2].string,yyvsp[-1].string); ;
    break;}
case 40:
#line 187 "mit2mot.y"
{ if (Modus&DRAUSSEN)
		    yyval.string = cprintf("%s(%s,%s.%s)",yyvsp[-4].string,yyvsp[-7].string,yyvsp[-2].string,yyvsp[-1].string);
		  else
		    yyval.string = cprintf("(%s,%s,%s.%s)",yyvsp[-4].string,yyvsp[-7].string,yyvsp[-2].string,yyvsp[-1].string); ;
    break;}
case 41:
#line 192 "mit2mot.y"
{ if (Modus&DRAUSSEN)
		    yyval.string = cprintf("(%s)(%s,%s.%s)",yyvsp[-5].string,yyvsp[-8].string,yyvsp[-2].string,yyvsp[-1].string);
		  else
		    yyval.string = cprintf("((%s),%s,%s.%s)",yyvsp[-5].string,yyvsp[-8].string,yyvsp[-2].string,yyvsp[-1].string); ;
    break;}
case 42:
#line 198 "mit2mot.y"
{ Setmc68020();
		  yyval.string = cprintf("(%s,%s.%s*%s)",yyvsp[-7].string,yyvsp[-4].string,yyvsp[-3].string,yyvsp[-1].string); ;
    break;}
case 43:
#line 201 "mit2mot.y"
{ Setmc68020();
		  if (Modus&DRAUSSEN)
		    yyval.string = cprintf("%s(%s,%s.%s*%s)",yyvsp[-6].string,yyvsp[-9].string,yyvsp[-4].string,yyvsp[-3].string,yyvsp[-1].string);
		  else
		    yyval.string = cprintf("(%s,%s,%s.%s*%s)",yyvsp[-6].string,yyvsp[-9].string,yyvsp[-4].string,yyvsp[-3].string,yyvsp[-1].string); ;
    break;}
case 44:
#line 207 "mit2mot.y"
{ Setmc68020();
		  if (Modus&DRAUSSEN)
		    yyval.string = cprintf("(%s)(%s,%s.%s*%s)",yyvsp[-7].string,yyvsp[-10].string,yyvsp[-4].string,yyvsp[-3].string,yyvsp[-1].string);
		  else
                    yyval.string = cprintf("((%s),%s,%s.%s*%s)",yyvsp[-7].string,yyvsp[-10].string,yyvsp[-4].string,yyvsp[-3].string,yyvsp[-1].string); ;
    break;}
case 45:
#line 214 "mit2mot.y"
{ Setmc68020();
		  if (Modus&DRAUSSEN)
		    yyval.string = cprintf("%s([%s,%s.%s*%s])",yyvsp[-1].string,yyvsp[-11].string,yyvsp[-8].string,yyvsp[-7].string,yyvsp[-5].string);
		  else
		    yyval.string = cprintf("([%s,%s.%s*%s],%s)",yyvsp[-11].string,yyvsp[-8].string,yyvsp[-7].string,yyvsp[-5].string,yyvsp[-1].string); ;
    break;}
case 46:
#line 220 "mit2mot.y"
{ Setmc68020();
		  if (Modus&DRAUSSEN)
		    yyval.string = cprintf("%s(%s[%s,%s.%s*%s])",yyvsp[-1].string,yyvsp[-10].string,yyvsp[-13].string,yyvsp[-8].string,yyvsp[-7].string,yyvsp[-5].string); 
		  else
                    yyval.string = cprintf("([%s,%s,%s.%s*%s],%s)",yyvsp[-10].string,yyvsp[-13].string,yyvsp[-8].string,yyvsp[-7].string,yyvsp[-5].string,yyvsp[-1].string); ;
    break;}
case 47:
#line 227 "mit2mot.y"
{ Setmc68020();
		  if (Modus&DRAUSSEN)
		    yyval.string = cprintf("%s(%s[%s],%s.%s*%s)",yyvsp[-1].string,yyvsp[-10].string,yyvsp[-13].string,yyvsp[-6].string,yyvsp[-5].string,yyvsp[-3].string);
		  else
		    yyval.string = cprintf("([%s,%s],%s.%s*%s,%s)",yyvsp[-10].string,yyvsp[-13].string,yyvsp[-6].string,yyvsp[-5].string,yyvsp[-3].string,yyvsp[-1].string); ;
    break;}
case 48:
#line 234 "mit2mot.y"
{ Setmc68020();
                  yyval.string = cprintf("%s{%s:%s}",yyvsp[-7].string,yyvsp[-4].string,yyvsp[-1].string); ;
    break;}
case 51:
#line 247 "mit2mot.y"
{ yyval.string =
				  cprintf_worte(KlammerAussenWeg(yyvsp[0].worte)); ;
    break;}
case 52:
#line 251 "mit2mot.y"
{ yyval.worte = create_wort(yyvsp[0].number.string); ;
    break;}
case 53:
#line 252 "mit2mot.y"
{ yyval.worte = create_wort(yyvsp[0].string); ;
    break;}
case 54:
#line 253 "mit2mot.y"
{ yyval.worte = 
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("+"),
				  contact_wort( yyvsp[0].worte,
				                create_wort(")") ))));
				  ;
    break;}
case 55:
#line 260 "mit2mot.y"
{ yyval.worte =
                                  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("-"),
				  contact_wort( yyvsp[0].worte,
	      				        create_wort(")") ))));
				  ;
    break;}
case 56:
#line 267 "mit2mot.y"
{ yyval.worte =
			          contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("*"),
				  contact_wort( yyvsp[0].worte,
		      		                create_wort(")") ))));
				  ;
    break;}
case 57:
#line 274 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("/"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 58:
#line 281 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("%"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 59:
#line 288 "mit2mot.y"
{ yyval.worte = 
				  contact_wort( create_wort("(-"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ));
				  ;
    break;}
case 60:
#line 293 "mit2mot.y"
{ yyval.worte = 
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("&"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 61:
#line 300 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("|"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 62:
#line 307 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("^"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 63:
#line 314 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("(~"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ));
				  ;
    break;}
case 64:
#line 319 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort(">"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 65:
#line 326 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-3].worte,
				  contact_wort( create_wort(">"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 66:
#line 333 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-2].worte,
				  contact_wort( create_wort("<"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 67:
#line 340 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-3].worte,
				  contact_wort( create_wort("<"),
				  contact_wort( yyvsp[0].worte,
						create_wort(")") ))));
				  ;
    break;}
case 68:
#line 347 "mit2mot.y"
{ yyval.worte =
				  contact_wort( create_wort("("),
				  contact_wort( yyvsp[-1].worte,
				                create_wort(")") ));
				  ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 465 "/gnu/lib/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 353 "mit2mot.y"

static void printcomment( const char *s )
/* Gibt den String "s" als Kommentar aus.
   Jede neue Zeile muss mit einem ";" beginnen. */
{
if (s!=NULL)
  for ( ; *s!=0; s++)
    putc(*s,fd_out);
}

static short CalkRegistersHelp( long *pt_value, short *pt_n )
{
short rest;
if (PreDecrement==TRUE)
  {
  rest = (*pt_value) & 0x8000;
  *pt_value = (*pt_value) << 1;
  }
else
  {
  rest = (*pt_value) & 0x1;
  *pt_value = (*pt_value) >> 1;
  }
(*pt_n)++;
return rest;
}

static char *CalkRegisters( long value )
{
char *result;
char *register_list[16] =  { "d0","d1","d2","d3","d4","d5","d6","d7",
                             "a0","a1","a2","a3","a4","a5","a6","a7" };
short i,n;
result=NULL;
for (n=0; n<16; )
  {
  if (CalkRegistersHelp( &value, &n )!=0)
    {
    i=n;
    while (CalkRegistersHelp( &value, &n)!=0)
      ;
    if (result==NULL) result=cprintfappendinit();
    else cprintfappend("/");
    if (n-1==i)
      cprintfappend("%s",register_list[n-2]);
    else
      cprintfappend("%s-%s",register_list[i-1],register_list[n-2]);
    }
  }
if (result==NULL) result="0";
return result;
}

static struct t_worte *KlammerAussenWeg( struct t_worte *w )
{
int n;
if (w==NULL) return w;
for(n=0; w->letztes->wort[n]!=0; n++)
  ;
if (n==0) return w;
if (w->erstes->wort[0]=='(' && strcmp(w->letztes->wort,")")==0)
  {
  w->letztes->wort = "";
  w->erstes->wort++;
  }
return w;
}

struct t_worte *create_wort( char *kette )
/* Aus einer Zeichenkette wird eine einelementige Wortliste */
{
struct t_worte *wort;
struct t_wortkette *wortkette;

wort = (struct t_worte *) malloc( sizeof(*wort) );
if (wort==NULL)
  { fprintf(stderr,"Speicher voll.\n");
    exit(1); }
wortkette = (struct t_wortkette *) malloc( sizeof(*wortkette) );
if (wortkette==NULL)
  { fprintf(stderr,"Speicher voll.\n");
    exit(1); }
wortkette->wort=kette;
wortkette->naechstes=NULL;
wort->letztes=wort->erstes=wortkette;
return wort;
}

struct t_worte *contact_wort(struct t_worte *w1,struct t_worte *w2)
/* Zwei Wortlisten w1 und w2 werden aneinandergehaengt */
{
w1->letztes->naechstes=w2->erstes;
w1->letztes=w2->letztes;
free(w2);
return w1;
}

char *cprintf_worte( struct t_worte *w )
/* Aus einer Wortliste wird ein String gemacht. Der Speicher
   fuer den String wird durch cprintf() alloziert. Der Speicher
   fuer die Wortliste wird freigegeben */
{
char *result;
struct t_wortkette *wortkette, *naechstes;

result = cprintfappendinit();
for (wortkette=w->erstes; wortkette!=NULL; wortkette=naechstes)
  {
  cprintfappend("%s",wortkette->wort);
  naechstes=wortkette->naechstes;
  free(wortkette);
  }
free(w);
return result;
}

