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

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

#define	t_a	258
#define	t_c	259
#define	t_add	260
#define	t_addc	261
#define	t_subb	262
#define	t_anl	263
#define	t_orl	264
#define	t_xrl	265
#define	t_inc	266
#define	t_dec	267
#define	t_clr	268
#define	t_cpl	269
#define	t_rl	270
#define	t_rlc	271
#define	t_rr	272
#define	t_rrc	273
#define	t_swap	274
#define	t_da	275
#define	t_dptr	276
#define	t_mul	277
#define	t_ab	278
#define	t_div	279
#define	t_mov	280
#define	t_movc	281
#define	t_movx	282
#define	t_push	283
#define	t_pop	284
#define	t_xch	285
#define	t_setb	286
#define	t_jc	287
#define	t_jnc	288
#define	t_jb	289
#define	t_jnb	290
#define	t_jbc	291
#define	t_acall	292
#define	t_lcall	293
#define	t_ret	294
#define	t_reti	295
#define	t_ajmp	296
#define	t_ljmp	297
#define	t_sjmp	298
#define	t_jmp	299
#define	t_jz	300
#define	t_jnz	301
#define	t_cjne	302
#define	t_djnz	303
#define	t_nop	304
#define	t_val	305
#define	t_name	306
#define	t_bit	307
#define	t_r0	308
#define	t_r1	309
#define	t_r2	310
#define	t_r3	311
#define	t_r4	312
#define	t_r5	313
#define	t_r6	314
#define	t_r7	315
#define	t_pc	316
#define	t_nl	317
#define	t_xchd	318
#define	t_end	319
#define	t_b	320
#define	t_long	321
#define	t_byte	322
#define	t_word	323
#define	t_string	324
#define	t_db	325
#define	t_dl	326
#define	t_dw	327
#define	t_text	328
#define	t_data	329

#line 1 "51.y"

/*
 *      Copyright (c) 1991 Paul Campbell
 *      All Rights Reserved
 *      THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Paul Campbell
 *      The copyright notice above does not evidence any
 *      actual or intended publication of such source code.
 */

#include <stdio.h>
#include <stdlib.h>
#include "lex.h"
#pragma segment parser
extern int op_size, pass, valid, text, data;
extern unsigned short pc;
extern unsigned short text_pc;
extern unsigned short data_pc;
extern void emit1();
extern void emit2();
extern void emit3();
#define P1(x)		op_size = (x);if (pass == 1) break;
static char *cp;
static int csize;
unsigned char chrel(long offset)
{
	if (pass == 2 && (offset < -128 || offset > 127))
		yyerror("Short branch target out of range",0,0,0,0,0,0);
	return(offset&0xff);
}
unsigned char cha(long offset)
{
	if (pass == 2 && (offset&0xf800) != (pc&0xf800))
		yyerror("Branch target out of range",0,0,0,0,0,0);
	return(offset);
}
void
yyerror1(char *s)
{
	yyerror(s, 0, 0,0,0,0,0);
}
void
yyerror2(char *s,long a)
{
	yyerror(s, a, 0,0,0,0,0);
}
#define yyerror yyerror1

#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

#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>

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



#define	YYFINAL		337
#define	YYFLAG		-32768
#define	YYNTBASE	94

#define YYTRANSLATE(x) ((unsigned)(x) <= 329 ? yytranslate[x] : 142)

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,     2,     2,    80,     2,    89,    85,     2,    92,
    93,    90,    82,    78,    88,    76,    81,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    77,     2,    86,
    75,    87,     2,    79,     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,    84,     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,    83,     2,    91,     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,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,    70,    71,    72,    73,    74
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     3,     4,     7,     9,    12,    14,    15,    19,    20,
    21,    27,    28,    32,    37,    42,    47,    48,    54,    56,
    59,    64,    69,    75,    81,    86,    92,    97,   103,   105,
   107,   109,   112,   115,   119,   122,   125,   127,   128,   132,
   133,   137,   138,   142,   143,   147,   148,   152,   153,   157,
   159,   161,   163,   167,   169,   173,   175,   177,   179,   181,
   183,   185,   187,   189,   191,   193,   195,   197,   199,   201,
   203,   205,   207,   209,   211,   213,   215,   217,   219,   221,
   224,   227,   230,   235,   240,   246,   252,   257,   262,   268,
   273,   278,   283,   289,   295,   301,   307,   314,   320,   328,
   336,   342,   348,   354,   360,   363,   366,   371,   376,   382,
   388,   393,   398,   401,   404,   407,   410,   413,   416,   419,
   422,   427,   432,   437,   440,   443,   445,   447,   450,   453,
   456,   462,   465,   468,   475,   483,   491,   500,   505,   510,
   512,   514,   516,   518,   520,   522,   524,   526,   528,   530,
   532,   534,   536,   538,   540,   542,   545,   546,   550,   552,
   556,   558,   562,   564,   569,   574,   576,   580,   584,   586,
   590,   594,   598,   600,   602,   604,   606,   609,   612,   616,
   618,   622,   626,   630,   632
};

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

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
    59,    62,    63,    66,    68,    71,    72,    74,    74,    75,
    77,    77,    79,    79,    83,    86,    90,    98,   100,   101,
   104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
   114,   115,   116,   117,   118,   119,   120,   121,   121,   122,
   122,   123,   123,   124,   124,   125,   125,   126,   126,   127,
   132,   139,   141,   144,   146,   149,   168,   169,   180,   181,
   182,   183,   184,   185,   188,   189,   190,   193,   194,   197,
   198,   201,   203,   204,   205,   206,   207,   208,   209,   212,
   213,   214,   217,   218,   219,   220,   221,   222,   223,   224,
   225,   226,   227,   228,   229,   230,   231,   232,   233,   234,
   235,   236,   237,   238,   239,   240,   241,   242,   243,   244,
   245,   246,   249,   250,   251,   252,   253,   254,   257,   258,
   259,   260,   261,   262,   263,   264,   265,   266,   267,   268,
   269,   270,   271,   272,   273,   274,   275,   276,   277,   278,
   281,   284,   287,   288,   289,   290,   291,   292,   293,   294,
   297,   298,   301,   304,   307,   310,   313,   316,   317,   320,
   321,   324,   325,   328,   329,   330,   333,   334,   335,   338,
   347,   356,   357,   360,   361,   362,   363,   364,   365,   368,
   370,   378,   396,   399,   405
};

static const char * const yytname[] = {   "$","error","$illegal.","t_a","t_c",
"t_add","t_addc","t_subb","t_anl","t_orl","t_xrl","t_inc","t_dec","t_clr","t_cpl",
"t_rl","t_rlc","t_rr","t_rrc","t_swap","t_da","t_dptr","t_mul","t_ab","t_div",
"t_mov","t_movc","t_movx","t_push","t_pop","t_xch","t_setb","t_jc","t_jnc","t_jb",
"t_jnb","t_jbc","t_acall","t_lcall","t_ret","t_reti","t_ajmp","t_ljmp","t_sjmp",
"t_jmp","t_jz","t_jnz","t_cjne","t_djnz","t_nop","t_val","t_name","t_bit","t_r0",
"t_r1","t_r2","t_r3","t_r4","t_r5","t_r6","t_r7","t_pc","t_nl","t_xchd","t_end",
"t_b","t_long","t_byte","t_word","t_string","t_db","t_dl","t_dw","t_text","t_data",
"'='","'.'","':'","','","'@'","'#'","'/'","'+'","'|'","'^'","'&'","'<'","'>'",
"'-'","'%'","'*'","'~'","'('","')'","lines","end_o","line_list","line","@1",
"@2","@3","@4","@5","label","inst","@6","@7","@8","@9","@10","@11","vlist","vlista",
"vexp","vaexp","dop","sdop","sdop2","uop","xuop","misc","move","cc","jump","rel",
"addr16","reg","reg01","d256","immed","immed16","eexp","V1","exp","exp1","exp2",
"exp2a","exp3","exp4","exp5","bit","name",""
};
#endif

static const short yyr1[] = {     0,
    94,    95,    95,    96,    96,    97,    98,    97,    99,   100,
    97,   101,    97,    97,    97,    97,   102,    97,   103,   103,
   104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
   104,   104,   104,   104,   104,   104,   104,   105,   104,   106,
   104,   107,   104,   108,   104,   109,   104,   110,   104,   104,
   104,   111,   111,   112,   112,   113,   114,   114,   115,   115,
   115,   115,   115,   115,   116,   116,   116,   117,   117,   118,
   118,   119,   119,   119,   119,   119,   119,   119,   119,   120,
   120,   120,   121,   121,   121,   121,   121,   121,   121,   121,
   121,   121,   121,   121,   121,   121,   121,   121,   121,   121,
   121,   121,   121,   121,   121,   121,   121,   121,   121,   121,
   121,   121,   122,   122,   122,   122,   122,   122,   123,   123,
   123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
   123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
   124,   125,   126,   126,   126,   126,   126,   126,   126,   126,
   127,   127,   128,   129,   130,   131,   132,   133,   133,   134,
   134,   135,   135,   136,   136,   136,   137,   137,   137,   138,
   138,   138,   138,   139,   139,   139,   139,   139,   139,   140,
   140,   140,   140,   141,   141
};

static const short yyr2[] = {     0,
     2,     0,     2,     1,     2,     1,     0,     3,     0,     0,
     5,     0,     3,     4,     4,     4,     0,     5,     1,     2,
     4,     4,     5,     5,     4,     5,     4,     5,     1,     1,
     1,     2,     2,     3,     2,     2,     1,     0,     3,     0,
     3,     0,     3,     0,     3,     0,     3,     0,     3,     1,
     1,     1,     3,     1,     3,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
     2,     2,     4,     4,     5,     5,     4,     4,     5,     4,
     4,     4,     5,     5,     5,     5,     6,     5,     7,     7,
     5,     5,     5,     5,     2,     2,     4,     4,     5,     5,
     4,     4,     2,     2,     2,     2,     2,     2,     2,     2,
     4,     4,     4,     2,     2,     1,     1,     2,     2,     2,
     5,     2,     2,     6,     7,     7,     8,     4,     4,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     2,     0,     3,     1,     3,
     1,     3,     1,     4,     4,     1,     3,     3,     1,     3,
     3,     3,     1,     1,     1,     1,     2,     2,     3,     1,
     3,     3,     3,     1,     1
};

static const short yydefact[] = {    38,
    59,    60,    61,    65,    66,    67,    70,    71,   157,   157,
    74,    75,    76,    77,    78,    79,     0,     0,   157,     0,
     0,   157,   157,     0,   157,     0,     0,   157,   157,   157,
     0,     0,   126,   127,     0,     0,     0,     0,     0,     0,
     0,   157,   140,    19,     0,     6,     0,    50,    51,     0,
     2,     4,     9,    12,     0,     0,     0,     0,     0,     0,
     0,   157,     0,   157,     0,    37,    29,    30,    31,    80,
   113,   180,     0,     0,   114,   117,   118,    81,    82,     0,
     0,     0,   143,   144,   145,   146,   147,   148,   149,   150,
     0,     0,     0,   153,     0,     0,     0,     0,   105,   153,
   106,     0,   115,   116,   184,   185,   119,   141,   120,     0,
     0,     0,   124,   142,   125,   128,   129,   130,     0,   132,
   133,     0,     0,     0,     0,     0,   157,    20,   157,     0,
   157,     0,     1,     5,     0,    38,     0,   157,   157,   157,
   157,   157,   157,     0,     0,     0,    35,     0,    32,    33,
    36,     0,     0,   174,   176,     0,     0,   157,   156,   159,
   161,   163,   166,   169,   173,   175,   157,   157,     0,   151,
   152,     0,   157,   157,     0,     0,     0,     0,     0,   157,
     0,     0,     0,     0,   157,     0,     0,     0,     0,     0,
     0,     0,     0,    17,     3,     8,    10,    13,    39,    52,
    56,    41,    58,    43,    57,    54,    45,    47,    49,   157,
     0,   157,    34,   181,   182,   183,   177,   178,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   157,    83,    84,   111,   157,   157,    87,   157,    88,    90,
     0,   157,    91,    92,   112,     0,     0,     0,     0,     0,
   107,   108,   121,   122,   123,     0,   157,     0,     0,   157,
   138,   139,    14,    15,    16,     0,     0,     0,   157,   157,
     0,   157,    21,    22,    25,   157,   157,    27,   179,   158,
   160,   162,     0,     0,   167,   168,   170,   171,   172,    85,
    86,   154,    98,   155,    95,   157,    96,    89,    93,    94,
     0,   102,   101,   104,   103,   109,   131,     0,     0,   157,
     0,   110,    18,    11,    53,    55,    23,    24,    26,    28,
   164,   165,    97,     0,     0,   134,     0,     0,    99,   100,
   135,     0,   136,   137,     0,     0,     0
};

static const short yydefgoto[] = {   335,
   133,    51,    52,   135,   136,   268,   137,   267,    53,    54,
    55,    56,    57,    58,    59,    60,   199,   204,   200,   206,
    61,    62,    63,    64,    65,    66,    67,    68,    69,   107,
   113,    92,   172,    93,   291,   293,   100,    74,   159,   160,
   161,   162,   163,   164,   165,    75,   108
};

static const short yypact[] = {   373,
-32768,-32768,-32768,    83,   100,    13,    -2,-32768,    31,    33,
-32768,-32768,-32768,-32768,-32768,-32768,    21,    37,    85,    59,
    28,-32768,-32768,    65,    11,   -11,   -11,    62,    62,    62,
   -11,   -11,-32768,-32768,   -11,   -11,   -11,    39,   -11,   -11,
    38,   236,-32768,   -69,    45,-32768,   109,-32768,-32768,    47,
   301,-32768,    67,-32768,    58,    79,    82,    56,    81,    89,
   172,-32768,   177,   200,   196,-32768,-32768,-32768,-32768,-32768,
-32768,   124,   126,    60,-32768,-32768,-32768,-32768,-32768,   127,
   128,   129,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   115,   131,   132,   126,   144,   146,   147,    17,-32768,-32768,
-32768,   148,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   150,
   151,   153,-32768,-32768,-32768,-32768,-32768,-32768,   230,-32768,
-32768,   157,   115,   169,   170,   173,    62,-32768,    62,   185,
-32768,   188,-32768,-32768,   203,   445,   204,-32768,-32768,   198,
-32768,-32768,   198,   192,   193,   194,-32768,   115,-32768,-32768,
-32768,   223,    -4,-32768,-32768,    60,    60,-32768,-32768,   191,
   197,   190,   103,   -16,   -32,-32768,   442,    62,   205,-32768,
-32768,   199,     1,    20,   274,   201,   207,   206,   209,   161,
   -11,   -11,   -11,   215,   224,   225,   242,   -11,   -11,   -20,
   221,   262,   272,-32768,-32768,-32768,-32768,-32768,   276,-32768,
-32768,   276,-32768,   277,-32768,-32768,   276,   276,   277,   470,
     2,   -22,-32768,-32768,-32768,-32768,-32768,-32768,   263,    60,
    60,    60,   271,   273,    60,    60,    60,    60,    60,   115,
-32768,-32768,-32768,-32768,-32768,     4,-32768,-32768,-32768,-32768,
   115,-32768,-32768,-32768,-32768,   355,    48,   356,   358,   115,
-32768,-32768,-32768,-32768,-32768,   341,-32768,   288,   290,-32768,
-32768,-32768,-32768,-32768,-32768,   115,   314,   332,-32768,   198,
   115,-32768,-32768,-32768,-32768,-32768,    62,-32768,-32768,-32768,
-32768,-32768,    60,    60,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   344,-32768,-32768,-32768,-32768,-32768,-32768,   318,   -11,-32768,
   345,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,   -18,   -11,-32768,   349,   -11,-32768,-32768,
-32768,   -11,-32768,-32768,   428,   429,-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,   379,-32768,-32768,-32768,-32768,-32768,-32768,   295,
-32768,-32768,-32768,-32768,-32768,-32768,   -26,   289,   -90,   163,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -27,
    73,    -9,   -84,     3,   -64,-32768,    -8,-32768,   214,   216,
   217,   -92,   -31,   -43,    41,    -1,    16
};


#define	YYLAST		550


static const short yytable[] = {   109,
    73,    73,   329,   237,   275,   127,   295,   128,    77,   118,
    94,   120,   121,   179,   103,   -64,    73,    95,    70,    73,
    73,    73,   240,   104,    99,   101,   110,   111,   112,    72,
    97,   124,   125,   -72,    71,   -73,    76,   178,   186,   105,
   122,   263,   330,    78,   126,   215,   114,   114,   227,   205,
   114,   114,   205,   106,   149,   153,   228,   229,   277,    79,
   216,    96,    72,   213,   145,   225,   150,   102,   302,   170,
   171,   226,    83,    84,    85,    86,    87,    88,    89,    90,
   238,   276,    72,   296,    72,   -62,   -68,    80,    81,   166,
    83,    84,    85,    86,    87,    88,    89,    90,   241,   242,
   170,   171,   -63,   -69,   115,    82,    98,   116,   117,   154,
   105,   130,   202,    72,   207,   208,   123,   119,   190,   129,
    73,   131,   194,   138,   106,   191,   141,   192,    -7,   201,
   201,   201,   201,   201,   201,   155,    72,    83,    84,    85,
    86,    87,    88,    89,    90,   290,   139,   156,   140,   219,
   157,   158,   142,   253,   254,   255,   299,   232,   143,    73,
   261,   262,   303,    91,   243,   306,   234,   170,   171,   233,
   251,   166,   166,   298,   144,   239,   244,   300,   315,   205,
   146,   312,   252,   287,   288,   289,   317,   258,   223,   224,
   321,   322,   308,   285,   286,   311,   217,   218,   151,   152,
   273,   153,   147,    73,   167,   168,   169,   318,   173,   174,
   278,   319,   274,    83,    84,    85,    86,    87,    88,    89,
    90,   175,   292,   176,   177,   180,   294,   181,   182,   292,
   183,   323,   184,   292,   185,   166,   166,   166,   297,   250,
   166,   166,   166,   166,   166,   327,   187,   188,   292,   195,
   189,   292,    83,    84,    85,    86,    87,    88,    89,    90,
   201,   201,   193,   292,   196,   198,   203,   292,    73,   210,
   211,   212,   214,   220,   222,   320,   236,   245,   148,   246,
   221,   326,   264,   248,   235,   247,   249,   292,    83,    84,
    85,    86,    87,    88,    89,    90,   256,   331,   166,   166,
   333,   292,   259,   257,   334,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,   260,    17,   265,    18,    19,    20,    21,    22,    23,
    24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
    34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
   266,    44,    45,   269,   270,   279,   283,   301,   304,   284,
   305,   307,    46,    47,   132,   309,   -38,   -42,   -40,   310,
   -48,   -44,   -46,    48,    49,   313,    50,     1,     2,     3,
     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
    14,    15,    16,   314,    17,   325,    18,    19,    20,    21,
    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
    32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
    42,    43,   328,    44,    45,   324,   332,   336,   337,   134,
   197,   209,   316,   280,    46,    47,   281,     0,   282,   -42,
   -40,     0,   -48,   -44,   -46,    48,    49,     0,    50,     1,
     2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
    12,    13,    14,    15,    16,     0,    17,     0,    18,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    40,    41,    42,    43,    83,    84,    85,    86,    87,    88,
    89,    90,     0,     0,     0,     0,     0,    47,     0,     0,
     0,   -42,   -40,     0,   -48,   -44,   -46,    48,    49,     0,
   230,   231,    83,    84,    85,    86,    87,    88,    89,    90,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,   271,   272
};

static const short yycheck[] = {    27,
     9,    10,    21,     3,     3,    75,     3,    77,    10,    37,
    19,    39,    40,    98,     4,     3,    25,    19,    21,    28,
    29,    30,     3,    25,    22,    23,    28,    29,    30,    52,
     3,    41,    42,     3,     4,     3,     4,    21,   123,    51,
     3,    62,    61,    23,    42,    50,    31,    32,    81,   140,
    35,    36,   143,    65,    64,    76,    89,    90,    81,    23,
    65,     3,    52,   148,    62,    82,    64,     3,    21,    53,
    54,    88,    53,    54,    55,    56,    57,    58,    59,    60,
    80,    80,    52,    80,    52,     3,     4,     3,     4,    74,
    53,    54,    55,    56,    57,    58,    59,    60,    79,    80,
    53,    54,     3,     4,    32,    21,    79,    35,    36,    50,
    51,     3,   139,    52,   141,   142,    79,    79,   127,    75,
   129,    75,   131,    66,    65,   127,    71,   129,    62,   138,
   139,   140,   141,   142,   143,    76,    52,    53,    54,    55,
    56,    57,    58,    59,    60,   230,    68,    88,    67,   158,
    91,    92,    72,   181,   182,   183,   241,   167,    70,   168,
   188,   189,   247,    79,   174,   250,   168,    53,    54,   167,
   180,   156,   157,   238,     3,   173,   174,   242,   269,   270,
     4,   266,   180,   227,   228,   229,   271,   185,    86,    87,
   283,   284,   257,   225,   226,   260,   156,   157,     3,    76,
   210,    76,     3,   212,    78,    78,    78,   272,    78,    78,
   212,   276,   210,    53,    54,    55,    56,    57,    58,    59,
    60,    78,   231,    78,    78,    78,   235,    78,    78,   238,
    78,   296,     3,   242,    78,   220,   221,   222,   236,    79,
   225,   226,   227,   228,   229,   310,    78,    78,   257,    62,
    78,   260,    53,    54,    55,    56,    57,    58,    59,    60,
   269,   270,    78,   272,    62,    62,    69,   276,   277,    78,
    78,    78,    50,    83,    85,   277,    78,     4,    79,    79,
    84,   309,    62,    78,    80,    79,    78,   296,    53,    54,
    55,    56,    57,    58,    59,    60,    82,   325,   283,   284,
   328,   310,    78,    80,   332,     5,     6,     7,     8,     9,
    10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
    20,    80,    22,    62,    24,    25,    26,    27,    28,    29,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
    79,    51,    52,    78,    78,    93,    86,     3,     3,    87,
     3,    21,    62,    63,    64,    78,    66,    67,    68,    80,
    70,    71,    72,    73,    74,    62,    76,     5,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
    18,    19,    20,    62,    22,    78,    24,    25,    26,    27,
    28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
    38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
    48,    49,    78,    51,    52,    82,    78,     0,     0,    51,
   136,   143,   270,   220,    62,    63,   221,    -1,   222,    67,
    68,    -1,    70,    71,    72,    73,    74,    -1,    76,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    -1,    22,    -1,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    53,    54,    55,    56,    57,    58,
    59,    60,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,
    -1,    67,    68,    -1,    70,    71,    72,    73,    74,    -1,
    79,    80,    53,    54,    55,    56,    57,    58,    59,    60,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    79,    80
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/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 "/usr/local/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 7:
#line 72 "51.y"
{ /*if (pass == 1) set_val($1, pc, 0);*/;
    break;}
case 9:
#line 74 "51.y"
{ /*if (pass == 1) set_val($1, pc, 0);*/ ;
    break;}
case 10:
#line 75 "51.y"
{ pc += op_size;;
    break;}
case 12:
#line 77 "51.y"
{ pc += op_size; ;
    break;}
case 14:
#line 79 "51.y"
{ 
											  if (pass == 2 || valid) set_val((struct dict *)yyvsp[-3], yyvsp[-1], 0);
											;
    break;}
case 15:
#line 83 "51.y"
{ 
											  if (pass == 1) ((struct dict *)yyvsp[-3])->bits = 1;
											;
    break;}
case 16:
#line 86 "51.y"
{ 
											  if (pass == 2 && valid) set_val((struct dict *)yyvsp[-3], yyvsp[-1], 1);
											;
    break;}
case 17:
#line 90 "51.y"
{ if (!valid) {
												yyerror("Undefined value in assignment to '.'");
											  } else {
											 	pc = yyvsp[0];
												if (pass == 2) 	set_addr();
											  }
											;
    break;}
case 19:
#line 100 "51.y"
{new_label((struct dict *)yyvsp[0]); yyval = yyvsp[0];;
    break;}
case 20:
#line 101 "51.y"
{new_label((struct dict *)yyvsp[-1]); yyval = yyvsp[-1];;
    break;}
case 21:
#line 104 "51.y"
{P1(1);emit1(yyvsp[-3]|8|yyvsp[0]);;
    break;}
case 22:
#line 105 "51.y"
{P1(2);emit2(yyvsp[-3]|5,yyvsp[0]);;
    break;}
case 23:
#line 106 "51.y"
{P1(1);emit1(yyvsp[-4]|6|yyvsp[0]);;
    break;}
case 24:
#line 107 "51.y"
{P1(2);emit2(yyvsp[-4]|4,yyvsp[0]);;
    break;}
case 25:
#line 108 "51.y"
{P1(2);emit2(yyvsp[-3]|2,yyvsp[-2]);;
    break;}
case 26:
#line 109 "51.y"
{P1(3);emit3(yyvsp[-4]|3,yyvsp[-3],yyvsp[0]);;
    break;}
case 27:
#line 110 "51.y"
{P1(2);emit2(yyvsp[-3]>>8, yyvsp[0]);;
    break;}
case 28:
#line 111 "51.y"
{P1(2);emit2(yyvsp[-4]&0xff, yyvsp[0]);;
    break;}
case 32:
#line 115 "51.y"
{P1(1);emit1(yyvsp[-1]|8|yyvsp[0]);;
    break;}
case 33:
#line 116 "51.y"
{P1(2);emit2(yyvsp[-1]|5,yyvsp[0]);;
    break;}
case 34:
#line 117 "51.y"
{P1(1);emit1(yyvsp[-2]|6|yyvsp[0]);;
    break;}
case 35:
#line 118 "51.y"
{P1(1);emit1(yyvsp[-1]|4);;
    break;}
case 36:
#line 119 "51.y"
{P1(1);emit1(yyvsp[-1]);;
    break;}
case 38:
#line 121 "51.y"
{csize = 4;op_size=0;;
    break;}
case 40:
#line 122 "51.y"
{csize = 2;op_size=0;;
    break;}
case 42:
#line 123 "51.y"
{csize = 1;op_size=0;;
    break;}
case 44:
#line 124 "51.y"
{csize = 4;op_size=0;;
    break;}
case 46:
#line 125 "51.y"
{csize = 2;op_size=0;;
    break;}
case 48:
#line 126 "51.y"
{csize = 1;op_size=0;;
    break;}
case 50:
#line 127 "51.y"
{ if (!text) { data_pc = pc; data = 0;
														   pc = text_pc; text = 1; 
														   if (pass == 2) set_addr(); }
											   op_size = 0;
											;
    break;}
case 51:
#line 132 "51.y"
{ if (!data) { text_pc = pc; text = 0;
														   pc = data_pc; data = 1; 
														   if (pass == 2) set_addr(); }
											   op_size = 0;
											;
    break;}
case 56:
#line 149 "51.y"
{ if (pass == 2) {
													if (csize == 1) {
														if (yyvsp[0] < 0 || yyvsp[0] > 0xff) 
																yyerror("byte constant too big");
														emit1(yyvsp[0]);
													} else
													if (csize == 2) {
														if (yyvsp[0] < 0 || yyvsp[0] > 0xffff) 
																yyerror("word constant too big");
														emit2(yyvsp[0], yyvsp[0]>>8);
													} else {
														emit2(yyvsp[0],     yyvsp[0]>>8);
														emit2(yyvsp[0]>>16, yyvsp[0]>>24);
													}
												  } 
												  pc += csize;
												;
    break;}
case 58:
#line 169 "51.y"
{ 	cp = (char *)yyvsp[0];
												pc += strlen(cp)+1;
												if (pass == 2) {
													while (*cp)
														emit1(*cp++);
													emit1(0);
												}
												free((char *)yyvsp[0]);
											;
    break;}
case 59:
#line 180 "51.y"
{ yyval = 0x20;;
    break;}
case 60:
#line 181 "51.y"
{ yyval = 0x30;;
    break;}
case 61:
#line 182 "51.y"
{ yyval = 0x90;;
    break;}
case 62:
#line 183 "51.y"
{ yyval = 0x50;;
    break;}
case 63:
#line 184 "51.y"
{ yyval = 0x40;;
    break;}
case 64:
#line 185 "51.y"
{ yyval = 0x60;;
    break;}
case 65:
#line 188 "51.y"
{ yyval = 0x50;;
    break;}
case 66:
#line 189 "51.y"
{ yyval = 0x40;;
    break;}
case 67:
#line 190 "51.y"
{ yyval = 0x60;;
    break;}
case 68:
#line 193 "51.y"
{ yyval = 0x82b0;;
    break;}
case 69:
#line 194 "51.y"
{ yyval = 0x72c0;;
    break;}
case 70:
#line 197 "51.y"
{ yyval = 0x00;;
    break;}
case 71:
#line 198 "51.y"
{ yyval = 0x10;;
    break;}
case 72:
#line 202 "51.y"
{ yyval = 0xe4;;
    break;}
case 73:
#line 203 "51.y"
{ yyval = 0xf4;;
    break;}
case 74:
#line 204 "51.y"
{ yyval = 0x23;;
    break;}
case 75:
#line 205 "51.y"
{ yyval = 0x33;;
    break;}
case 76:
#line 206 "51.y"
{ yyval = 0x03;;
    break;}
case 77:
#line 207 "51.y"
{ yyval = 0x13;;
    break;}
case 78:
#line 208 "51.y"
{ yyval = 0xc4;;
    break;}
case 79:
#line 209 "51.y"
{ yyval = 0xd4;;
    break;}
case 80:
#line 212 "51.y"
{P1(1);emit1(0xa3);;
    break;}
case 81:
#line 213 "51.y"
{P1(1);emit1(0xa4);;
    break;}
case 82:
#line 214 "51.y"
{P1(1);emit1(0x84);;
    break;}
case 83:
#line 217 "51.y"
{P1(1);emit1(0xe8|yyvsp[0]);;
    break;}
case 84:
#line 218 "51.y"
{P1(2);emit2(0xe5,yyvsp[0]);;
    break;}
case 85:
#line 219 "51.y"
{P1(1);emit1(0xe6|yyvsp[0]);;
    break;}
case 86:
#line 220 "51.y"
{P1(2);emit2(0x74,yyvsp[0]);;
    break;}
case 87:
#line 221 "51.y"
{P1(1);emit1(0xf8|yyvsp[-2]);;
    break;}
case 88:
#line 222 "51.y"
{P1(2);emit2(0xa8|yyvsp[-2],yyvsp[0]);;
    break;}
case 89:
#line 223 "51.y"
{P1(2);emit2(0x78|yyvsp[-3],yyvsp[0]);;
    break;}
case 90:
#line 224 "51.y"
{P1(2);emit2(0xf5,yyvsp[-2]);;
    break;}
case 91:
#line 225 "51.y"
{P1(2);emit2(0x88|yyvsp[0], yyvsp[-2]);;
    break;}
case 92:
#line 226 "51.y"
{P1(3);emit3(0x85,yyvsp[0],yyvsp[-2]);;
    break;}
case 93:
#line 227 "51.y"
{P1(2);emit2(0xe6|yyvsp[0],yyvsp[-3]);;
    break;}
case 94:
#line 228 "51.y"
{P1(3);emit3(0x75,yyvsp[-3],yyvsp[0]);;
    break;}
case 95:
#line 229 "51.y"
{P1(1);emit1(0xf6|yyvsp[-2]);;
    break;}
case 96:
#line 230 "51.y"
{P1(2);emit2(0xa6|yyvsp[-2],yyvsp[0]);;
    break;}
case 97:
#line 231 "51.y"
{P1(2);emit2(0x76|yyvsp[-3],yyvsp[0]);;
    break;}
case 98:
#line 232 "51.y"
{P1(3);emit3(0x90,yyvsp[0]>>8,yyvsp[0]&0xff);;
    break;}
case 99:
#line 233 "51.y"
{P1(1);emit1(0x93);;
    break;}
case 100:
#line 234 "51.y"
{P1(1);emit1(0x83);;
    break;}
case 101:
#line 235 "51.y"
{P1(1);emit1(0xe2|yyvsp[0]);;
    break;}
case 102:
#line 236 "51.y"
{P1(1);emit1(0xe0);;
    break;}
case 103:
#line 237 "51.y"
{P1(1);emit1(0xf2|yyvsp[-2]);;
    break;}
case 104:
#line 238 "51.y"
{P1(1);emit1(0xf0);;
    break;}
case 105:
#line 239 "51.y"
{P1(2);emit2(0xc0,yyvsp[0]);;
    break;}
case 106:
#line 240 "51.y"
{P1(2);emit2(0xd0,yyvsp[0]);;
    break;}
case 107:
#line 241 "51.y"
{P1(1);emit1(0xc8|yyvsp[0]);;
    break;}
case 108:
#line 242 "51.y"
{P1(2);emit2(0xc5,yyvsp[0]);;
    break;}
case 109:
#line 243 "51.y"
{P1(1);emit1(0xc6|yyvsp[0]);;
    break;}
case 110:
#line 244 "51.y"
{P1(1);emit1(0xd6|yyvsp[0]);;
    break;}
case 111:
#line 245 "51.y"
{P1(2);emit2(0xa2,yyvsp[0]);;
    break;}
case 112:
#line 246 "51.y"
{P1(2);emit2(0x92,yyvsp[-2]);;
    break;}
case 113:
#line 249 "51.y"
{P1(1);emit1(0xc3);;
    break;}
case 114:
#line 250 "51.y"
{P1(2);emit2(0xc2,yyvsp[0]);;
    break;}
case 115:
#line 251 "51.y"
{P1(1);emit1(0xd3);;
    break;}
case 116:
#line 252 "51.y"
{P1(2);emit2(0xd2,yyvsp[0]);;
    break;}
case 117:
#line 253 "51.y"
{P1(1);emit1(0xb3);;
    break;}
case 118:
#line 254 "51.y"
{P1(2);emit2(0xb2,yyvsp[0]);;
    break;}
case 119:
#line 257 "51.y"
{P1(2);emit2(0x40,chrel(yyvsp[0]-2));;
    break;}
case 120:
#line 258 "51.y"
{P1(2);emit2(0x50,chrel(yyvsp[0]-2));;
    break;}
case 121:
#line 259 "51.y"
{P1(3);emit3(0x20,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 122:
#line 260 "51.y"
{P1(3);emit3(0x30,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 123:
#line 261 "51.y"
{P1(3);emit3(0x10,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 124:
#line 262 "51.y"
{P1(2);emit2(0x11|((yyvsp[0]>>3)&0xe0),cha(yyvsp[0])&0xff);;
    break;}
case 125:
#line 263 "51.y"
{P1(3);emit3(0x12,yyvsp[0]>>8,yyvsp[0]&0xff);;
    break;}
case 126:
#line 264 "51.y"
{P1(1);emit1(0x22);;
    break;}
case 127:
#line 265 "51.y"
{P1(1);emit1(0x32);;
    break;}
case 128:
#line 266 "51.y"
{P1(2);emit2(0x01|((yyvsp[0]>>3)&0xe0),cha(yyvsp[0])&0xff);;
    break;}
case 129:
#line 267 "51.y"
{P1(3);emit3(0x02,yyvsp[0]>>8,yyvsp[0]&0xff);;
    break;}
case 130:
#line 268 "51.y"
{P1(2);emit2(0x80,chrel(yyvsp[0]-2));;
    break;}
case 131:
#line 269 "51.y"
{P1(1);emit1(0x73);;
    break;}
case 132:
#line 270 "51.y"
{P1(2);emit2(0x60,chrel(yyvsp[0]-2));;
    break;}
case 133:
#line 271 "51.y"
{P1(2);emit2(0x70,chrel(yyvsp[0]-2));;
    break;}
case 134:
#line 272 "51.y"
{P1(3);emit3(0xb5,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 135:
#line 273 "51.y"
{P1(3);emit3(0xb4,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 136:
#line 274 "51.y"
{P1(3);emit3(0xb8|yyvsp[-5],yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 137:
#line 275 "51.y"
{P1(3);emit3(0xb5|yyvsp[-5],yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 138:
#line 276 "51.y"
{P1(2);emit2(0xd8|yyvsp[-2],chrel(yyvsp[0]-2));;
    break;}
case 139:
#line 277 "51.y"
{P1(3);emit3(0xd5,yyvsp[-2],chrel(yyvsp[0]-3));;
    break;}
case 140:
#line 278 "51.y"
{P1(1);emit1(0x00);;
    break;}
case 141:
#line 281 "51.y"
{ yyval = yyvsp[0]-pc; ;
    break;}
case 142:
#line 284 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 143:
#line 287 "51.y"
{ yyval = 0; ;
    break;}
case 144:
#line 288 "51.y"
{ yyval = 1; ;
    break;}
case 145:
#line 289 "51.y"
{ yyval = 2; ;
    break;}
case 146:
#line 290 "51.y"
{ yyval = 3; ;
    break;}
case 147:
#line 291 "51.y"
{ yyval = 4; ;
    break;}
case 148:
#line 292 "51.y"
{ yyval = 5; ;
    break;}
case 149:
#line 293 "51.y"
{ yyval = 6; ;
    break;}
case 150:
#line 294 "51.y"
{ yyval = 7; ;
    break;}
case 151:
#line 297 "51.y"
{ yyval = 0; ;
    break;}
case 152:
#line 298 "51.y"
{ yyval = 1; ;
    break;}
case 153:
#line 301 "51.y"
{ yyval = yyvsp[0]&0xff; if (pass == 2 && yyvsp[0]&0xff00) yyerror("Invalid direct address (too big)");;
    break;}
case 154:
#line 304 "51.y"
{ yyval = yyvsp[0]&0xff; if (pass == 2 && yyvsp[0]&0xff00) yyerror("Invalid 8-bit immediate value (too big)");;
    break;}
case 155:
#line 307 "51.y"
{ yyval = yyvsp[0]&0xffff; ;
    break;}
case 156:
#line 310 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 157:
#line 313 "51.y"
{ valid = 1; ;
    break;}
case 158:
#line 316 "51.y"
{ yyval = yyvsp[-2] | yyvsp[0]; ;
    break;}
case 159:
#line 317 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 160:
#line 320 "51.y"
{ yyval = yyvsp[-2] ^ yyvsp[0]; ;
    break;}
case 161:
#line 321 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 162:
#line 324 "51.y"
{ yyval = yyvsp[-2] & yyvsp[0]; ;
    break;}
case 163:
#line 325 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 164:
#line 328 "51.y"
{ yyval = yyvsp[-3] << yyvsp[0]; ;
    break;}
case 165:
#line 329 "51.y"
{ yyval = yyvsp[-3] >> yyvsp[0]; ;
    break;}
case 166:
#line 330 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 167:
#line 333 "51.y"
{ yyval = yyvsp[-2] + yyvsp[0]; ;
    break;}
case 168:
#line 334 "51.y"
{ yyval = yyvsp[-2] - yyvsp[0]; ;
    break;}
case 169:
#line 335 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 170:
#line 338 "51.y"
{ if (yyvsp[0] == 0) {
									yyval = 0;
									if (pass == 2)
										yyerror("Divide by 0");
								  } else {
								  	yyval = yyvsp[-2] / yyvsp[0];
								  }
								;
    break;}
case 171:
#line 347 "51.y"
{ if (yyvsp[0] == 0) {
									yyval = 0;
									if (pass == 2)
										yyerror("Mod by 0");
								  } else {
								  	yyval = yyvsp[-2] % yyvsp[0];
								  }
								;
    break;}
case 172:
#line 356 "51.y"
{ yyval = yyvsp[-2] * yyvsp[0]; ;
    break;}
case 173:
#line 357 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 174:
#line 360 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 175:
#line 361 "51.y"
{ yyval = yyvsp[0]; ;
    break;}
case 176:
#line 362 "51.y"
{ yyval = pc; ;
    break;}
case 177:
#line 363 "51.y"
{ yyval = -yyvsp[0]; ;
    break;}
case 178:
#line 364 "51.y"
{ yyval = ~yyvsp[0]; ;
    break;}
case 179:
#line 365 "51.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 180:
#line 369 "51.y"
{ yyval = ((struct dict *)yyvsp[0])->val; ;
    break;}
case 181:
#line 370 "51.y"
{ if (pass == 1) {
						  			yyerror("can't take a bit offset on a bit constant");
									if (yyvsp[0] < 0 || yyvsp[0] > 8) {
						  				yyerror("bit offset out of the range 0..7");
									} 
								  }
								;
    break;}
case 182:
#line 378 "51.y"
{ if (pass == 2) {
									if (yyvsp[0] < 0 || yyvsp[0] > 8) {
						  				yyerror("bit offset out of the range 0..7");
									} else
									if (yyvsp[-2] < 0x20 || yyvsp[-2] > 0xff ||
										(yyvsp[-2] > 0x2f && yyvsp[-2] < 0x80) ||
										(yyvsp[-2] >= 0x80 && yyvsp[-2] <= 0xff && yyvsp[-2]&0x07)) {
						  				yyerror("invalid base for bit offset");
									} else {
										if (yyvsp[-2] >= 0x80) {
											yyval = yyvsp[-2] | yyvsp[0];
										} else {
											yyval = ((yyvsp[-2]&0x1f)<<3) | yyvsp[0];
										}
									}
								  }
								;
    break;}
case 183:
#line 396 "51.y"
{ yyval = yyvsp[-2]; ;
    break;}
case 184:
#line 399 "51.y"
{ yyval = ((struct dict *)yyvsp[0])->val; 
						  valid &= ((struct dict *)yyvsp[0])->valid; 
						  if (pass == 2 && !((struct dict *)yyvsp[0])->valid) {
						  	yyerror2("Undefined variable '%s'", (long)((struct dict *)yyvsp[0])->name);
						  }
						;
    break;}
case 185:
#line 405 "51.y"
{ yyval = 0xf0; ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 465 "/usr/local/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 407 "51.y"
