m68k-parse.c

来自「基于4个mips核的noc设计」· C语言 代码 · 共 2,067 行 · 第 1/4 页

C
2,067
字号
/*  A Bison parser, made from m68k-parse.y    by GNU Bison version 1.28  */#define YYBISON 1  /* Identify Bison output.  */#define	DR	257#define	AR	258#define	FPR	259#define	FPCR	260#define	LPC	261#define	ZAR	262#define	ZDR	263#define	LZPC	264#define	CREG	265#define	INDEXREG	266#define	EXPR	267#line 27 "m68k-parse.y"#include "as.h"#include "tc-m68k.h"#include "m68k-parse.h"/* Remap normal yacc parser interface names (yyparse, yylex, yyerror,   etc), as well as gratuitiously global symbol names If other parser   generators (bison, byacc, etc) produce additional global names that   conflict at link time, then those parser generators need to be   fixed instead of adding those names to this list. */#define	yymaxdepth m68k_maxdepth#define	yyparse	m68k_parse#define	yylex	m68k_lex#define	yyerror	m68k_error#define	yylval	m68k_lval#define	yychar	m68k_char#define	yydebug	m68k_debug#define	yypact	m68k_pact	#define	yyr1	m68k_r1			#define	yyr2	m68k_r2			#define	yydef	m68k_def		#define	yychk	m68k_chk		#define	yypgo	m68k_pgo		#define	yyact	m68k_act		#define	yyexca	m68k_exca#define yyerrflag m68k_errflag#define yynerrs	m68k_nerrs#define	yyps	m68k_ps#define	yypv	m68k_pv#define	yys	m68k_s#define	yy_yys	m68k_yys#define	yystate	m68k_state#define	yytmp	m68k_tmp#define	yyv	m68k_v#define	yy_yyv	m68k_yyv#define	yyval	m68k_val#define	yylloc	m68k_lloc#define yyreds	m68k_reds		/* With YYDEBUG defined */#define yytoks	m68k_toks		/* With YYDEBUG defined */#define yylhs	m68k_yylhs#define yylen	m68k_yylen#define yydefred m68k_yydefred#define yydgoto	m68k_yydgoto#define yysindex m68k_yysindex#define yyrindex m68k_yyrindex#define yygindex m68k_yygindex#define yytable	 m68k_yytable#define yycheck	 m68k_yycheck#ifndef YYDEBUG#define YYDEBUG 1#endif/* Internal functions.  */static enum m68k_register m68k_reg_parse PARAMS ((char **));static int yylex PARAMS ((void));static void yyerror PARAMS ((const char *));/* The parser sets fields pointed to by this global variable.  */static struct m68k_op *op;#line 93 "m68k-parse.y"typedef union{  struct m68k_indexreg indexreg;  enum m68k_register reg;  struct m68k_exp exp;  unsigned long mask;  int onereg;} YYSTYPE;#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define	YYFINAL		173#define	YYFLAG		-32768#define	YYNTBASE	25#define YYTRANSLATE(x) ((unsigned)(x) <= 267 ? yytranslate[x] : 44)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,    14,     2,     2,    15,     2,    16,    17,     2,    18,    20,    19,     2,    24,     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,    21,     2,    22,     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,     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,     3,     4,     5,     6,     7,     8,     9,    10,    11,    12,    13};#if YYDEBUG != 0static const short yyprhs[] = {     0,     0,     2,     4,     6,     8,    10,    12,    14,    16,    18,    21,    24,    26,    30,    35,    40,    46,    52,    57,    61,    65,    69,    77,    85,    92,    98,   105,   111,   118,   124,   130,   135,   145,   153,   162,   169,   180,   189,   200,   209,   218,   221,   225,   229,   235,   242,   253,   263,   274,   276,   278,   280,   282,   284,   286,   288,   290,   292,   294,   296,   298,   300,   302,   303,   305,   307,   309,   310,   313,   314,   317,   318,   321,   323,   327,   331,   333,   335,   339,   343,   347,   349,   351,   353};static const short yyrhs[] = {    26,     0,    27,     0,    28,     0,     3,     0,     4,     0,     5,     0,     6,     0,    11,     0,    13,     0,    14,    13,     0,    15,    13,     0,    40,     0,    16,     4,    17,     0,    16,     4,    17,    18,     0,    19,    16,     4,    17,     0,    16,    13,    20,    34,    17,     0,    16,    34,    20,    13,    17,     0,    13,    16,    34,    17,     0,    16,     7,    17,     0,    16,     8,    17,     0,    16,    10,    17,     0,    16,    13,    20,    34,    20,    29,    17,     0,    16,    13,    20,    34,    20,    36,    17,     0,    16,    13,    20,    30,    37,    17,     0,    16,    30,    20,    13,    17,     0,    13,    16,    34,    20,    29,    17,     0,    16,    34,    20,    29,    17,     0,    13,    16,    34,    20,    36,    17,     0,    16,    34,    20,    36,    17,     0,    13,    16,    30,    37,    17,     0,    16,    30,    37,    17,     0,    16,    21,    13,    37,    22,    20,    29,    38,    17,     0,    16,    21,    13,    37,    22,    38,    17,     0,    16,    21,    34,    22,    20,    29,    38,    17,     0,    16,    21,    34,    22,    38,    17,     0,    16,    21,    13,    20,    34,    20,    29,    22,    38,    17,     0,    16,    21,    34,    20,    29,    22,    38,    17,     0,    16,    21,    13,    20,    34,    20,    36,    22,    38,    17,     0,    16,    21,    34,    20,    36,    22,    38,    17,     0,    16,    21,    39,    30,    37,    22,    38,    17,     0,    35,    23,     0,    35,    23,    18,     0,    35,    23,    19,     0,    35,    23,    16,    13,    17,     0,    35,    23,    16,    39,    29,    17,     0,    35,    23,    16,    13,    17,    23,    16,    39,    29,    17,     0,    35,    23,    16,    13,    17,    23,    16,    13,    17,     0,    35,    23,    16,    39,    29,    17,    23,    16,    13,    17,     0,    12,     0,    31,     0,    12,     0,    32,     0,    32,     0,     4,     0,     8,     0,     3,     0,     9,     0,     4,     0,     7,     0,    33,     0,    10,     0,     8,     0,     0,    34,     0,     7,     0,    10,     0,     0,    20,    34,     0,     0,    20,    13,     0,     0,    13,    20,     0,    42,     0,    42,    24,    41,     0,    43,    24,    41,     0,    43,     0,    42,     0,    42,    24,    41,     0,    43,    24,    41,     0,    43,    19,    43,     0,     3,     0,     4,     0,     5,     0,     6,     0};#endif#if YYDEBUG != 0static const short yyrline[] = { 0,   116,   118,   119,   124,   130,   135,   140,   145,   150,   155,   160,   165,   177,   183,   188,   193,   203,   213,   223,   228,   233,   238,   245,   256,   263,   269,   276,   282,   293,   303,   310,   316,   324,   331,   338,   344,   352,   359,   371,   382,   394,   403,   411,   419,   429,   436,   444,   451,   464,   466,   478,   480,   491,   493,   494,   499,   501,   506,   508,   514,   516,   517,   522,   527,   532,   534,   539,   544,   552,   558,   566,   572,   580,   582,   586,   597,   602,   603,   607,   613,   623,   628,   632,   636};#endif#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)static const char * const yytname[] = {   "$","error","$undefined.","DR","AR","FPR","FPCR","LPC","ZAR","ZDR","LZPC","CREG","INDEXREG","EXPR","'#'","'&'","'('","')'","'+'","'-'","','","'['","']'","'@'","'/'","operand","generic_operand","motorola_operand","mit_operand","zireg","zdireg","zadr","zdr","apc","zapc","optzapc","zpc","optczapc","optcexpr","optexprc","reglist","ireglist","reglistpair","reglistreg", NULL};#endifstatic const short yyr1[] = {     0,    25,    25,    25,    26,    26,    26,    26,    26,    26,    26,    26,    26,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    27,    28,    28,    28,    28,    28,    28,    28,    28,    29,    29,    30,    30,    31,    31,    31,    32,    32,    33,    33,    34,    34,    34,    35,    35,    36,    36,    37,    37,    38,    38,    39,    39,    40,    40,    40,    41,    41,    41,    41,    42,    43,    43,    43,    43};static const short yyr2[] = {     0,     1,     1,     1,     1,     1,     1,     1,     1,     1,     2,     2,     1,     3,     4,     4,     5,     5,     4,     3,     3,     3,     7,     7,     6,     5,     6,     5,     6,     5,     5,     4,     9,     7,     8,     6,    10,     8,    10,     8,     8,     2,     3,     3,     5,     6,    10,     9,    10,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,     0,     1,     1,     1,     0,     2,     0,     2,     0,     2,     1,     3,     3,     1,     1,     3,     3,     3,     1,     1,     1,     1};static const short yydefact[] = {    63,    81,    82,    83,    84,    59,    62,    61,     8,     9,     0,     0,     0,     0,     1,     2,     3,    60,    64,     0,    12,    73,     0,     0,    10,    11,    56,    58,    59,    62,    57,    61,    51,     0,    71,    67,    52,     0,     0,    41,     0,     0,     0,    58,    67,     0,    13,    19,    20,    21,     0,    67,     0,     0,     0,     0,     0,     0,    71,    42,    43,    81,    82,    83,    84,    74,    77,    76,    80,    75,     0,     0,    18,     0,    14,    67,     0,    72,     0,     0,    69,    67,     0,    68,    31,    54,    65,    55,    66,    49,     0,     0,    50,    53,     0,    15,     0,     0,     0,     0,    30,     0,     0,     0,    16,     0,    68,    69,     0,     0,     0,     0,     0,    25,    17,    27,    29,    44,    72,     0,    78,    79,    26,    28,    24,     0,     0,     0,     0,     0,    69,    69,    70,    69,    35,    69,     0,    45,    22,    23,     0,     0,    69,    33,     0,     0,     0,     0,     0,    71,     0,    69,    69,     0,    37,    39,    34,    40,     0,     0,     0,     0,     0,    32,    47,     0,     0,    36,    38,    46,    48,     0,     0,     0};static const short yydefgoto[] = {   171,    14,    15,    16,    91,    35,    92,    93,    17,    83,    19,    94,    55,   111,    53,    20,    65,    66,    67};static const short yypact[] = {    89,    10,    11,    19,    23,-32768,-32768,-32768,-32768,    13,    -4,    22,    57,    36,-32768,-32768,-32768,-32768,-32768,    18,-32768,    33,    -2,   114,-32768,-32768,-32768,    46,    62,    66,-32768,    67,-32768,    68,   131,    69,-32768,    70,   105,   147,   156,   156,   156,-32768,    94,    25,   101,-32768,-32768,-32768,   114,   100,    53,     9,   138,   108,   103,   112,   117,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   119,    12,-32768,-32768,    64,   130,-32768,   124,-32768,    94,    81,    64,   135,   124,   132,    94,   150,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   151,   152,-32768,-32768,   153,-32768,   120,   146,   156,   156,-32768,   154,   155,   157,-32768,   124,   144,   158,   159,   160,    73,   162,   161,-32768,-32768,-32768,-32768,   163,-32768,   167,-32768,-32768,-32768,-32768,-32768,   168,   170,   124,    73,   171,   169,   169,-32768,   169,-32768,   169,   164,   172,-32768,-32768,   174,   175,   169,-32768,   177,   176,   181,   182,   183,   178,   185,   169,   169,   186,-32768,-32768,-32768,-32768,   136,   146,   179,   187,   188,-32768,-32768,   189,   190,-32768,-32768,-32768,-32768,   173,   194,-32768};static const short yypgoto[] = {-32768,-32768,-32768,-32768,   -72,     1,-32768,    -7,-32768,     3,-32768,   -65,   -31,  -103,   -58,-32768,   -40,   202,     6};#define	YYLAST		207static const short yytable[] = {    97,   101,    69,    18,   129,    36,    22,   108,   102,    24,    -4,    -5,    26,    71,   109,    37,    36,    41,    30,    -6,    78,    32,    42,    -7,    44,   119,    45,   145,   146,    23,   147,    41,   148,   125,   -58,    25,    99,    52,   133,   153,   126,    39,    72,    36,   103,    73,    36,    68,   161,   162,   112,    75,    38,    76,    81,   140,   142,    40,   120,   121,    26,    27,   141,    46,    28,    29,    30,    31,    43,    32,    33,     5,     6,    79,     7,    80,    26,    85,    34,    47,   106,    87,    30,    48,    49,    89,   132,   165,    50,    54,    56,   159,     1,     2,     3,     4,     5,     6,   104,     7,     8,   105,     9,    10,    11,    12,    26,    85,    13,    57,    86,    87,    30,    88,    70,    89,    90,    26,    43,    74,    77,     5,     6,    30,     7,    84,    32,    26,    85,    95,    96,    86,    87,    30,    88,    43,    89,   117,     5,     6,   118,     7,    43,    98,    51,     5,     6,   100,     7,    26,    85,    82,   110,   164,    87,    30,   118,   107,    89,    61,    62,    63,    64,    58,   127,    59,    60,   113,   114,   115,   116,   122,   123,   172,   124,     0,     0,     0,   128,   134,   149,   130,   131,   135,   137,   138,   136,   139,   143,   144,   132,   158,   166,   154,   173,   150,   151,   152,   155,   156,   157,   160,    21,   163,   167,   168,   169,   170};static const short yycheck[] = {    58,    73,    42,     0,   107,    12,     0,    79,    73,    13,     0,     0,     3,    44,    79,    12,    23,    19,     9,     0,    51,    12,    24,     0,    23,    97,    23,   130,   131,    16,   133,    19,   135,   105,    23,    13,    24,    34,   110,   142,   105,    23,    17,    50,    75,    20,    53,    41,   151,   152,    81,    50,    16,    50,    53,   127,   128,    24,    98,    99,     3,     4,   127,    17,     7,     8,     9,    10,     4,    12,    13,     7,     8,    20,    10,    22,     3,     4,    21,    17,    77,     8,     9,    17,    17,    12,    13,   159,    20,    20,    20,   149,     3,     4,     5,     6,     7,     8,    17,    10,    11,    20,    13,    14,    15,    16,     3,     4,    19,     4,     7,     8,     9,    10,    20,    12,    13,     3,     4,    18,    20,     7,     8,     9,    10,    17,    12,     3,     4,    17,    13,     7,     8,     9,    10,     4,    12,    17,     7,     8,    20,    10,     4,    24,    13,     7,     8,    17,    10,     3,     4,    13,    20,    17,     8,     9,    20,    22,    12,     3,     4,     5,     6,    16,    20,    18,    19,    17,    17,    17,    17,    17,    17,     0,    17,    -1,    -1,    -1,    20,    17,    16,    22,    22,    22,    17,    17,    23,    17,    17,    20,    13,    13,    13,    17,     0,    23,    22,    22,    17,    17,    17,    16,     0,    17,    17,    17,    17,    17};/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */#line 3 "/usr/share/bison/bison.simple"/* This file comes from bison-1.28.  *//* Skeleton output parser for bison,   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.   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 2, 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., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.  *//* As a special exception, when this file is copied by Bison into a   Bison output file, you may use that output file without restriction.   This special exception was added by the Free Software Foundation   in version 1.24 of Bison.  *//* 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.  */#ifndef YYSTACK_USE_ALLOCA#ifdef alloca#define YYSTACK_USE_ALLOCA#else /* alloca not defined */#ifdef __GNUC__#define YYSTACK_USE_ALLOCA#define alloca __builtin_alloca#else /* not GNU C.  */#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))#define YYSTACK_USE_ALLOCA#include <alloca.h>#else /* not sparc *//* We think this test detects Watcom and Microsoft C.  *//* This used to test MSDOS, but that is a bad idea   since that symbol is in the user namespace.  */#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)#if 0 /* No need for malloc.h, which pollutes the namespace;	 instead, just don't use alloca.  */#include <malloc.h>#endif#else /* not MSDOS, or __TURBOC__ */#if defined(_AIX)/* I don't know what this was needed for, but it pollutes the namespace.   So I turned it off.   rms, 2 May 1997.  *//* #include <malloc.h>  */ #pragma alloca#define YYSTACK_USE_ALLOCA#else /* not MSDOS, or __TURBOC__, or _AIX */#if 0#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,		 and on HPUX 10.  Eventually we can turn this on.  */#define YYSTACK_USE_ALLOCA#define alloca __builtin_alloca#endif /* __hpux */#endif#endif /* not _AIX */#endif /* not MSDOS, or __TURBOC__ */#endif /* not sparc */#endif /* not GNU C */#endif /* alloca not defined */#endif /* YYSTACK_USE_ALLOCA not defined */#ifdef YYSTACK_USE_ALLOCA#define YYSTACK_ALLOC alloca#else#define YYSTACK_ALLOC malloc#endif/* 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	goto yyacceptlab#define YYABORT 	goto yyabortlab#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#ifdef YYLEX_PARAM#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)#else#define YYLEX		yylex(&yylval, &yylloc)#endif#else /* not YYLSP_NEEDED */#ifdef YYLEX_PARAM#define YYLEX		yylex(&yylval, YYLEX_PARAM)#else#define YYLEX		yylex(&yylval)#endif#endif /* not YYLSP_NEEDED */#endif/* If nonreentrant, generate the variables here */#ifndef YYPUREint	yychar;			/*  the lookahead symbol		*/YYSTYPE	yylval;			/*  the semantic value of the		*/				/*  lookahead symbol			*/#ifdef YYLSP_NEEDEDYYLTYPE yylloc;			/*  location data for the lookahead	*/				/*  symbol				*/#endifint yynerrs;			/*  number of parse errors so far       */#endif  /* not YYPURE */#if YYDEBUG != 0int 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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?