Commit df68032d authored by Tanya Lattner's avatar Tanya Lattner
Browse files

Merge from mainline.

llvm-svn: 42085
parent 97f6d583
Loading
Loading
Loading
Loading
+41 −41
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header$
 * $Header: /cvs/root/flex/flex/skel.c,v 1.2 2004/05/07 00:28:17 jkh Exp $
 */

#define FLEX_SCANNER
@@ -502,7 +502,7 @@ goto find_rule; \
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 1 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
#define INITIAL 0
/*===-- FileLexer.l - Scanner for TableGen Files ----------------*- C++ -*-===//
// 
@@ -520,7 +520,7 @@ char *yytext;
#define YY_NEVER_INTERACTIVE 1
#define comment 1

#line 30 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 30 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
#include "llvm/Config/config.h"
#include "llvm/Support/Streams.h"
#include "Record.h"
@@ -817,7 +817,7 @@ YY_DECL
	register char *yy_cp, *yy_bp;
	register int yy_act;

#line 185 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 185 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"


#line 824 "Lexer.cpp"
@@ -913,185 +913,185 @@ do_action: /* This label is used only to access EOF actions. */
	{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 187 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 187 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ /* Ignore comments */ }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 189 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 189 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ HandleInclude(yytext); }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 190 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 190 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2);
                 return CODEFRAGMENT; }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 193 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 193 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return INT; }
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 194 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 194 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return BIT; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 195 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 195 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return BITS; }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 196 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 196 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return STRING; }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 197 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 197 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return LIST; }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 198 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 198 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return CODE; }
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 199 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 199 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return DAG; }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 201 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 201 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return CLASS; }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 202 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 202 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return DEF; }
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 203 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 203 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return DEFM; }
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 204 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 204 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return MULTICLASS; }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 205 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 205 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return FIELD; }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 206 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 206 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return LET; }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 207 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 207 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return IN; }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 209 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 209 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return CONCATTOK; }
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 210 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 210 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return SRATOK; }
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 211 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 211 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return SRLTOK; }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 212 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 212 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return SHLTOK; }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 213 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 213 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return STRCONCATTOK; }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 216 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 216 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ Filelval.StrVal = new std::string(yytext, yytext+yyleng);
                 return ID; }
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 218 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 218 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
                 return VARNAME; } 
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 221 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 221 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1);
                 return STRVAL; }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 224 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 224 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ Filelval.IntVal = ParseInt(Filetext); return INTVAL; }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 226 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 226 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ /* Ignore whitespace */ }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 229 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 229 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ BEGIN(comment); CommentDepth++; }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 230 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 230 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{} /* eat anything that's not a '*' or '/' */
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 231 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 231 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{} /* eat up '*'s not followed by '/'s */
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 232 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 232 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ ++CommentDepth; }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 233 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 233 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{} /* eat up /'s not followed by *'s */
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 234 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 234 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ if (!--CommentDepth) { BEGIN(INITIAL); } }
	YY_BREAK
case YY_STATE_EOF(comment):
#line 235 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 235 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ err() << "Unterminated comment!\n"; exit(1); }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 237 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 237 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
{ return Filetext[0]; }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 239 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 239 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 1098 "Lexer.cpp"
@@ -1978,6 +1978,6 @@ int main()
	return 0;
	}
#endif
#line 239 "/Volumes/Wildlings/echeng/llvm/utils/TableGen/FileLexer.l"
#line 239 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"

+1443 −2200

File changed.

Preview size limit exceeded, changes collapsed.

+27 −107
Original line number Diff line number Diff line
/* A Bison parser, made by GNU Bison 2.3.  */

/* Skeleton interface for Bison's Yacc-like parsers in C

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   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., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     INT = 258,
     BIT = 259,
     STRING = 260,
     BITS = 261,
     LIST = 262,
     CODE = 263,
     DAG = 264,
     CLASS = 265,
     DEF = 266,
     MULTICLASS = 267,
     DEFM = 268,
     FIELD = 269,
     LET = 270,
     IN = 271,
     SHLTOK = 272,
     SRATOK = 273,
     SRLTOK = 274,
     STRCONCATTOK = 275,
     INTVAL = 276,
     ID = 277,
     VARNAME = 278,
     STRVAL = 279,
     CODEFRAGMENT = 280
   };
#endif
/* Tokens.  */
#define INT 258
#define BIT 259
#define STRING 260
#define BITS 261
#define LIST 262
#define CODE 263
#define DAG 264
#define CLASS 265
#define DEF 266
#define MULTICLASS 267
#define DEFM 268
#define FIELD 269
#define LET 270
#define IN 271
#define SHLTOK 272
#define SRATOK 273
#define SRLTOK 274
#define STRCONCATTOK 275
#define INTVAL 276
#define ID 277
#define VARNAME 278
#define STRVAL 279
#define CODEFRAGMENT 280




#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 210 "/Volumes/Gir/devel/llvm/llvm.src/utils/TableGen/FileParser.y"
{
typedef union {
  std::string*                StrVal;
  int                         IntVal;
  llvm::RecTy*                Ty;
@@ -107,14 +10,31 @@ typedef union YYSTYPE
  SubClassRefTy*              SubClassRef;
  std::vector<SubClassRefTy>* SubClassList;
  std::vector<std::pair<llvm::Init*, std::string> >* DagValueList;
}
/* Line 1529 of yacc.c.  */
#line 113 "FileParser.tab.h"
	YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
} YYSTYPE;
#define	INT	257
#define	BIT	258
#define	STRING	259
#define	BITS	260
#define	LIST	261
#define	CODE	262
#define	DAG	263
#define	CLASS	264
#define	DEF	265
#define	MULTICLASS	266
#define	DEFM	267
#define	FIELD	268
#define	LET	269
#define	IN	270
#define	CONCATTOK	271
#define	SHLTOK	272
#define	SRATOK	273
#define	SRLTOK	274
#define	STRCONCATTOK	275
#define	INTVAL	276
#define	ID	277
#define	VARNAME	278
#define	STRVAL	279
#define	CODEFRAGMENT	280

extern YYSTYPE Filelval;

extern YYSTYPE Filelval;