aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/llvm-upgrade/Makefile32
-rw-r--r--tools/llvm-upgrade/UpgradeInternals.h396
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.cpp.cvs3251
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l430
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l.cvs430
-rw-r--r--tools/llvm-upgrade/UpgradeParser.cpp.cvs7002
-rw-r--r--tools/llvm-upgrade/UpgradeParser.h.cvs400
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y3849
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y.cvs3852
-rw-r--r--tools/llvm-upgrade/llvm-upgrade.cpp144
10 files changed, 0 insertions, 19786 deletions
diff --git a/tools/llvm-upgrade/Makefile b/tools/llvm-upgrade/Makefile
deleted file mode 100644
index 1c2f104764..0000000000
--- a/tools/llvm-upgrade/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-##===- tools/llvm-upgrade/Makefile -------------------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL = ../..
-TOOLNAME = llvm-upgrade
-LINK_COMPONENTS := Core support system
-REQUIRES_EH := 1
-
-include $(LEVEL)/Makefile.common
-
-# Make the object code file for the lexer depend upon the header file generated
-# by the Bison parser. This prevents the Lexer from being compiled before the
-# header file it needs is built.
-$(ObjDir)/upgradeLexer.o: $(PROJ_SRC_DIR)/UpgradeParser.h
-
-TESTCASE=../../test/Regression/Assembler/2004-09-29-VerifierIsReallySlow.llx
-test:
- llvm-as $(TESTCASE) -o - | llvm-dis -o source.ll -f
- ../../Debug/bin/llvm-upgrade -o - $(TESTCASE) 2>err.out | llvm-as | \
- llvm-dis > upgrade.ll -f
- diff source.ll upgrade.ll > diff.out
-
-valgrind:
- valgrind ../../Debug/bin/llvm-upgrade -o /dev/null -f $(TESTCASE)
-
-$(ObjDir)/UpgradeLexer.o: $(PROJ_SRC_DIR)/UpgradeParser.y $(PROJ_SRC_DIR)/UpgradeParser.h
diff --git a/tools/llvm-upgrade/UpgradeInternals.h b/tools/llvm-upgrade/UpgradeInternals.h
deleted file mode 100644
index c3d816bc13..0000000000
--- a/tools/llvm-upgrade/UpgradeInternals.h
+++ /dev/null
@@ -1,396 +0,0 @@
-//===-- ParserInternals.h - Definitions internal to the parser --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This header file defines the various variables that are shared among the
-// different components of the parser...
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef PARSER_INTERNALS_H
-#define PARSER_INTERNALS_H
-
-#include "llvm/Constants.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/Function.h"
-#include "llvm/Instructions.h"
-#include "llvm/ADT/StringExtras.h"
-#include <list>
-#include <iostream>
-#include <cstring>
-
-// Global variables exported from the lexer.
-extern int yydebug;
-extern void error(const std::string& msg, int line = -1);
-extern char* Upgradetext;
-extern int Upgradeleng;
-extern int Upgradelineno;
-
-namespace llvm {
-
-class Module;
-Module* UpgradeAssembly(const std::string &infile, std::istream& in,
- bool debug, bool addAttrs);
-
-extern std::istream* LexInput;
-
-// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
-// appropriate character. If AllowNull is set to false, a \00 value will cause
-// an error.
-//
-// If AllowNull is set to true, the return value of the function points to the
-// last character of the string in memory.
-//
-char *UnEscapeLexed(char *Buffer, bool AllowNull = false);
-
-/// InlineAsmDescriptor - This is a simple class that holds info about inline
-/// asm blocks, for use by ValID.
-struct InlineAsmDescriptor {
- std::string AsmString, Constraints;
- bool HasSideEffects;
-
- InlineAsmDescriptor(const std::string &as, const std::string &c, bool HSE)
- : AsmString(as), Constraints(c), HasSideEffects(HSE) {}
-};
-
-/// This class keeps track of the signedness of a type or value. It allows the
-/// signedness of a composite type to be captured in a relatively simple form.
-/// This is needed in order to retain the signedness of pre LLVM 2.0 types so
-/// they can be upgraded properly. Signedness of composite types must be
-/// captured in order to accurately get the signedness of a value through a
-/// GEP instruction.
-/// @brief Class to track signedness of types and values.
-struct Signedness {
- /// The basic kinds of signedness values.
- enum Kind {
- Signless, ///< The type doesn't have any sign.
- Unsigned, ///< The type is an unsigned integer.
- Signed, ///< The type is a signed integer.
- Named, ///< The type is a named type (probably forward ref or up ref).
- Composite ///< The type is composite (struct, array, pointer).
- };
-
-private:
- /// @brief Keeps track of Signedness for composite types
- typedef std::vector<Signedness> SignVector;
- Kind kind; ///< The kind of signedness node
- union {
- SignVector *sv; ///< The vector of Signedness for composite types
- std::string *name; ///< The name of the type for named types.
- };
-public:
- /// The Signedness class is used as a member of a union so it cannot have
- /// a constructor or assignment operator. This function suffices.
- /// @brief Copy one signedness value to another
- void copy(const Signedness &that);
- /// The Signedness class is used as a member of a union so it cannot have
- /// a destructor.
- /// @brief Release memory, if any allocated.
- void destroy();
-
- /// @brief Make a Signless node.
- void makeSignless() { kind = Signless; sv = 0; }
- /// @brief Make a Signed node.
- void makeSigned() { kind = Signed; sv = 0; }
- /// @brief Make an Unsigned node.
- void makeUnsigned() { kind = Unsigned; sv = 0; }
- /// @brief Make a Named node.
- void makeNamed(const std::string& nm){
- kind = Named; name = new std::string(nm);
- }
- /// @brief Make an empty Composite node.
- void makeComposite() { kind = Composite; sv = new SignVector(); }
- /// @brief Make an Composite node, with the first element given.
- void makeComposite(const Signedness &S) {
- kind = Composite;
- sv = new SignVector();
- sv->push_back(S);
- }
- /// @brief Add an element to a Composite node.
- void add(const Signedness &S) {
- assert(isComposite() && "Must be composite to use add");
- sv->push_back(S);
- }
- bool operator<(const Signedness &that) const;
- bool operator==(const Signedness &that) const;
- bool isSigned() const { return kind == Signed; }
- bool isUnsigned() const { return kind == Unsigned; }
- bool isSignless() const { return kind == Signless; }
- bool isNamed() const { return kind == Named; }
- bool isComposite() const { return kind == Composite; }
- /// This is used by GetElementPtr to extract the sign of an element.
- /// @brief Get a specific element from a Composite node.
- Signedness get(uint64_t idx) const {
- assert(isComposite() && "Invalid Signedness type for get()");
- assert(sv && idx < sv->size() && "Invalid index");
- return (*sv)[idx];
- }
- /// @brief Get the name from a Named node.
- const std::string& getName() const {
- assert(isNamed() && "Can't get name from non-name Sign");
- return *name;
- }
-#ifndef NDEBUG
- void dump() const;
-#endif
-};
-
-
-// ValID - Represents a reference of a definition of some sort. This may either
-// be a numeric reference or a symbolic (%var) reference. This is just a
-// discriminated union.
-//
-// Note that I can't implement this class in a straight forward manner with
-// constructors and stuff because it goes in a union.
-//
-struct ValID {
- enum {
- NumberVal, NameVal, ConstSIntVal, ConstUIntVal, ConstFPVal, ConstNullVal,
- ConstUndefVal, ConstZeroVal, ConstantVal, InlineAsmVal
- } Type;
-
- union {
- int Num; // If it's a numeric reference
- char *Name; // If it's a named reference. Memory must be free'd.
- int64_t ConstPool64; // Constant pool reference. This is the value
- uint64_t UConstPool64;// Unsigned constant pool reference.
- APFloat *ConstPoolFP; // Floating point constant pool reference
- Constant *ConstantValue; // Fully resolved constant for ConstantVal case.
- InlineAsmDescriptor *IAD;
- };
- Signedness S;
-
- static ValID create(int Num) {
- ValID D; D.Type = NumberVal; D.Num = Num; D.S.makeSignless();
- return D;
- }
-
- static ValID create(char *Name) {
- ValID D; D.Type = NameVal; D.Name = Name; D.S.makeSignless();
- return D;
- }
-
- static ValID create(int64_t Val) {
- ValID D; D.Type = ConstSIntVal; D.ConstPool64 = Val;
- D.S.makeSigned();
- return D;
- }
-
- static ValID create(uint64_t Val) {
- ValID D; D.Type = ConstUIntVal; D.UConstPool64 = Val;
- D.S.makeUnsigned();
- return D;
- }
-
- static ValID create(APFloat* Val) {
- ValID D; D.Type = ConstFPVal; D.ConstPoolFP = Val;
- D.S.makeSignless();
- return D;
- }
-
- static ValID createNull() {
- ValID D; D.Type = ConstNullVal;
- D.S.makeSignless();
- return D;
- }
-
- static ValID createUndef() {
- ValID D; D.Type = ConstUndefVal;
- D.S.makeSignless();
- return D;
- }
-
- static ValID createZeroInit() {
- ValID D; D.Type = ConstZeroVal;
- D.S.makeSignless();
- return D;
- }
-
- static ValID create(Constant *Val) {
- ValID D; D.Type = ConstantVal; D.ConstantValue = Val;
- D.S.makeSignless();
- return D;
- }
-
- static ValID createInlineAsm(const std::string &AsmString,
- const std::string &Constraints,
- bool HasSideEffects) {
- ValID D;
- D.Type = InlineAsmVal;
- D.IAD = new InlineAsmDescriptor(AsmString, Constraints, HasSideEffects);
- D.S.makeSignless();
- return D;
- }
-
- inline void destroy() const {
- if (Type == NameVal)
- free(Name); // Free this strdup'd memory.
- else if (Type == InlineAsmVal)
- delete IAD;
- }
-
- inline ValID copy() const {
- if (Type != NameVal) return *this;
- ValID Result = *this;
- Result.Name = strdup(Name);
- return Result;
- }
-
- inline std::string getName() const {
- switch (Type) {
- case NumberVal : return std::string("#") + itostr(Num);
- case NameVal : return Name;
- case ConstFPVal : return ftostr(*ConstPoolFP);
- case ConstNullVal : return "null";
- case ConstUndefVal : return "undef";
- case ConstZeroVal : return "zeroinitializer";
- case ConstUIntVal :
- case ConstSIntVal : return std::string("%") + itostr(ConstPool64);
- case ConstantVal:
- if (ConstantValue == ConstantInt::get(Type::Int1Ty, true))
- return "true";
- if (ConstantValue == ConstantInt::get(Type::Int1Ty, false))
- return "false";
- return "<constant expression>";
- default:
- assert(0 && "Unknown value!");
- abort();
- return "";
- }
- }
-
- bool operator<(const ValID &V) const {
- if (Type != V.Type) return Type < V.Type;
- switch (Type) {
- case NumberVal: return Num < V.Num;
- case NameVal: return strcmp(Name, V.Name) < 0;
- case ConstSIntVal: return ConstPool64 < V.ConstPool64;
- case ConstUIntVal: return UConstPool64 < V.UConstPool64;
- case ConstFPVal: return ConstPoolFP->compare(*V.ConstPoolFP) ==
- APFloat::cmpLessThan;
- case ConstNullVal: return false;
- case ConstUndefVal: return false;
- case ConstZeroVal: return false;
- case ConstantVal: return ConstantValue < V.ConstantValue;
- default: assert(0 && "Unknown value type!"); return false;
- }
- }
-};
-
-/// The following enums are used to keep track of prior opcodes. The lexer will
-/// retain the ability to parse obsolete opcode mnemonics and generates semantic
-/// values containing one of these enumerators.
-enum TermOps {
- RetOp, BrOp, SwitchOp, InvokeOp, UnwindOp, UnreachableOp
-};
-
-enum BinaryOps {
- AddOp, SubOp, MulOp,
- DivOp, UDivOp, SDivOp, FDivOp,
- RemOp, URemOp, SRemOp, FRemOp,
- AndOp, OrOp, XorOp,
- ShlOp, ShrOp, LShrOp, AShrOp,
- SetEQ, SetNE, SetLE, SetGE, SetLT, SetGT
-};
-
-enum MemoryOps {
- MallocOp, FreeOp, AllocaOp, LoadOp, StoreOp, GetElementPtrOp
-};
-
-enum OtherOps {
- PHIOp, CallOp, SelectOp, UserOp1, UserOp2, VAArg,
- ExtractElementOp, InsertElementOp, ShuffleVectorOp,
- ICmpOp, FCmpOp
-};
-
-enum CastOps {
- CastOp, TruncOp, ZExtOp, SExtOp, FPTruncOp, FPExtOp, FPToUIOp, FPToSIOp,
- UIToFPOp, SIToFPOp, PtrToIntOp, IntToPtrOp, BitCastOp
-};
-
-// An enumeration for the old calling conventions, ala LLVM 1.9
-namespace OldCallingConv {
- enum ID {
- C = 0, CSRet = 1, Fast = 8, Cold = 9, X86_StdCall = 64, X86_FastCall = 65,
- None = 99999
- };
-}
-
-/// These structures are used as the semantic values returned from various
-/// productions in the grammar. They simply bundle an LLVM IR object with
-/// its Signedness value. These help track signedness through the various
-/// productions.
-struct TypeInfo {
- const llvm::Type *T;
- Signedness S;
- bool operator<(const TypeInfo& that) const {
- if (this == &that)
- return false;
- if (T < that.T)
- return true;
- if (T == that.T) {
- bool result = S < that.S;
-//#define TYPEINFO_DEBUG
-#ifdef TYPEINFO_DEBUG
- std::cerr << (result?"true ":"false ") << T->getDescription() << " (";
- S.dump();
- std::cerr << ") < " << that.T->getDescription() << " (";
- that.S.dump();
- std::cerr << ")\n";
-#endif
- return result;
- }
- return false;
- }
- bool operator==(const TypeInfo& that) const {
- if (this == &that)
- return true;
- return T == that.T && S == that.S;
- }
- void destroy() { S.destroy(); }
-};
-
-struct PATypeInfo {
- llvm::PATypeHolder* PAT;
- Signedness S;
- void destroy() { S.destroy(); delete PAT; }
-};
-
-struct ConstInfo {
- llvm::Constant* C;
- Signedness S;
- void destroy() { S.destroy(); }
-};
-
-struct ValueInfo {
- llvm::Value* V;
- Signedness S;
- void destroy() { S.destroy(); }
-};
-
-struct InstrInfo {
- llvm::Instruction *I;
- Signedness S;
- void destroy() { S.destroy(); }
-};
-
-struct TermInstInfo {
- llvm::TerminatorInst *TI;
- Signedness S;
- void destroy() { S.destroy(); }
-};
-
-struct PHIListInfo {
- std::list<std::pair<llvm::Value*, llvm::BasicBlock*> > *P;
- Signedness S;
- void destroy() { S.destroy(); delete P; }
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/tools/llvm-upgrade/UpgradeLexer.cpp.cvs b/tools/llvm-upgrade/UpgradeLexer.cpp.cvs
deleted file mode 100644
index 8161bee559..0000000000
--- a/tools/llvm-upgrade/UpgradeLexer.cpp.cvs
+++ /dev/null
@@ -1,3251 +0,0 @@
-#line 2 "UpgradeLexer.cpp"
-
-#line 4 "UpgradeLexer.cpp"
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE Upgraderestart(Upgradein )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE (16384*64)
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int Upgradeleng;
-
-extern FILE *Upgradein, *Upgradeout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
- * access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE Upgradelex.
- * One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-Upgradelineno scanner, because yy_act is
- * normally declared as a register variable-- so it is not worth it.
- */
- #define YY_LESS_LINENO(n) \
- do { \
- int yyl;\
- for ( yyl = n; yyl < Upgradeleng; ++yyl )\
- if ( Upgradetext[yyl] == '\n' )\
- --Upgradelineno;\
- }while(0)
-
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up Upgradetext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
- YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up Upgradetext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr) )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via Upgraderestart()), so that the user can continue scanning by
- * just pointing Upgradein at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when Upgradetext is formed. */
-static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int Upgradeleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow Upgradewrap()'s to do buffer switches
- * instead of setting up a fresh Upgradein. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void Upgraderestart (FILE *input_file );
-void Upgrade_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE Upgrade_create_buffer (FILE *file,int size );
-void Upgrade_delete_buffer (YY_BUFFER_STATE b );
-void Upgrade_flush_buffer (YY_BUFFER_STATE b );
-void Upgradepush_buffer_state (YY_BUFFER_STATE new_buffer );
-void Upgradepop_buffer_state (void );
-
-static void Upgradeensure_buffer_stack (void );
-static void Upgrade_load_buffer_state (void );
-static void Upgrade_init_buffer (YY_BUFFER_STATE b,FILE *file );
-
-#define YY_FLUSH_BUFFER Upgrade_flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE Upgrade_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE Upgrade_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char *bytes,int len );
-
-void *Upgradealloc (yy_size_t );
-void *Upgraderealloc (void *,yy_size_t );
-void Upgradefree (void * );
-
-#define yy_new_buffer Upgrade_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! YY_CURRENT_BUFFER ){ \
- Upgradeensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- Upgrade_create_buffer(Upgradein,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! YY_CURRENT_BUFFER ){\
- Upgradeensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- Upgrade_create_buffer(Upgradein,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define Upgradewrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-FILE *Upgradein = (FILE *) 0, *Upgradeout = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int Upgradelineno;
-
-int Upgradelineno = 1;
-
-extern char *Upgradetext;
-#define yytext_ptr Upgradetext
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up Upgradetext.
- */
-#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- Upgradeleng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
- *yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 161
-#define YY_END_OF_BUFFER 162
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[620] =
- { 0,
- 0, 0, 162, 160, 159, 159, 160, 160, 160, 160,
- 160, 160, 152, 152, 1, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 0, 151, 0,
- 149, 148, 148, 155, 0, 153, 0, 157, 152, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 134, 0, 41, 0, 0, 0, 0, 0, 0, 0,
- 0, 94, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 62, 0, 0, 50, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
-
- 0, 0, 0, 80, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 23, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 151,
- 148, 148, 157, 20, 157, 0, 158, 0, 68, 0,
- 0, 79, 0, 0, 39, 0, 34, 0, 0, 0,
- 0, 42, 0, 0, 0, 0, 0, 0, 71, 0,
- 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 53, 56, 59, 0, 0, 0,
- 54, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 70, 25, 0, 104, 109, 107, 108, 106, 105, 0,
- 110, 114, 0, 0, 75, 133, 0, 0, 0, 0,
- 0, 0, 0, 99, 97, 88, 0, 89, 0, 0,
- 0, 98, 96, 0, 0, 69, 0, 0, 0, 0,
- 0, 0, 0, 0, 112, 103, 101, 0, 0, 102,
- 0, 100, 0, 113, 0, 111, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
- 150, 157, 0, 0, 0, 157, 0, 0, 0, 91,
- 0, 0, 61, 115, 116, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 93, 74, 0, 0, 0, 0, 141, 78, 0, 0,
- 92, 0, 0, 0, 0, 0, 0, 0, 0, 142,
- 57, 90, 0, 0, 22, 0, 0, 0, 154, 0,
- 73, 0, 0, 0, 0, 0, 0, 119, 0, 0,
- 0, 0, 77, 0, 0, 26, 0, 0, 4, 0,
- 66, 0, 72, 55, 0, 0, 0, 0, 0, 0,
- 76, 0, 0, 0, 0, 60, 0, 11, 0, 0,
- 118, 157, 36, 0, 0, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 0, 63, 121, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 65, 0, 0, 0, 0, 0,
- 0, 0, 48, 0, 0, 83, 87, 85, 86, 84,
- 82, 51, 0, 0, 0, 143, 0, 0, 0, 117,
- 49, 0, 58, 21, 0, 0, 0, 0, 0, 131,
- 0, 0, 0, 0, 0, 140, 0, 0, 45, 0,
- 0, 0, 0, 0, 0, 0, 64, 30, 24, 0,
- 0, 44, 123, 122, 0, 0, 7, 0, 0, 0,
- 0, 136, 0, 33, 139, 38, 67, 0, 0, 0,
- 129, 0, 0, 125, 135, 27, 28, 124, 0, 0,
- 137, 52, 132, 130, 0, 0, 0, 0, 0, 128,
-
- 0, 43, 0, 6, 29, 0, 0, 0, 0, 0,
- 120, 0, 0, 0, 0, 0, 0, 0, 0, 37,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
- 0, 0, 0, 0, 17, 0, 0, 0, 0, 9,
- 127, 10, 0, 126, 0, 0, 0, 0, 35, 0,
- 0, 0, 12, 0, 14, 13, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
- 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
- 0, 0, 0, 15, 0, 0, 0, 0, 31, 0,
- 0, 138, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 144, 0, 146, 147, 16,
- 0, 46, 0, 145, 18, 47, 0, 19, 0
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
- 1, 1, 7, 1, 8, 9, 1, 10, 11, 12,
- 13, 14, 15, 16, 15, 17, 15, 18, 19, 1,
- 1, 1, 1, 20, 21, 21, 21, 21, 22, 21,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 1, 1, 1, 1, 23, 1, 24, 25, 26, 27,
-
- 28, 29, 30, 31, 32, 5, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int32_t yy_meta[49] =
- { 0,
- 1, 1, 2, 1, 3, 1, 4, 5, 3, 6,
- 6, 6, 6, 6, 6, 6, 6, 7, 1, 1,
- 3, 8, 3, 3, 3, 3, 3, 8, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3
- } ;
-
-static yyconst flex_int16_t yy_base[630] =
- { 0,
- 0, 0, 1336, 1337, 1337, 1337, 1331, 1316, 41, 0,
- 49, 59, 69, 1287, 0, 112, 69, 72, 93, 113,
- 52, 122, 74, 152, 120, 77, 136, 156, 135, 71,
- 187, 186, 224, 118, 115, 56, 153, 1328, 1337, 1313,
- 1337, 0, 256, 0, 1321, 1320, 88, 264, 1282, 283,
- 0, 1323, 140, 157, 158, 121, 164, 183, 198, 32,
- 1308, 190, 95, 175, 54, 165, 217, 162, 117, 182,
- 218, 1307, 220, 272, 185, 100, 204, 219, 235, 241,
- 264, 232, 273, 57, 1306, 284, 285, 296, 297, 299,
- 300, 226, 298, 302, 308, 1305, 303, 309, 307, 316,
-
- 321, 329, 330, 332, 333, 334, 313, 337, 310, 315,
- 342, 343, 350, 353, 346, 352, 358, 363, 357, 365,
- 366, 1304, 373, 377, 381, 385, 383, 384, 389, 390,
- 402, 386, 392, 417, 418, 395, 271, 393, 403, 1303,
- 0, 0, 416, 1302, 0, 447, 0, 1315, 1300, 438,
- 428, 1299, 448, 427, 1298, 419, 1297, 451, 452, 453,
- 406, 1296, 454, 455, 456, 461, 457, 460, 1295, 465,
- 464, 470, 462, 477, 474, 480, 4