/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 3 of the License, 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, see <https://www.gnu.org/licenses/>.  */

/* 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.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* First part of user prologue.  */
#line 21 "../avrdude-6.3/config_gram.y"


#include "ac_cfg.h"

#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "avrdude.h"
#include "libavrdude.h"
#include "config.h"

#if defined(WIN32NATIVE)
#define strtok_r( _s, _sep, _lasts ) \
    ( *(_lasts) = strtok( (_s), (_sep) ) )
#endif

#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)

int yylex(void);
int yyerror(char * errmsg, ...);
int yywarning(char * errmsg, ...);

static int assign_pin(int pinno, TOKEN * v, int invert);
static int assign_pin_list(int invert);
static int which_opcode(TOKEN * opcode);
static int parse_cmdbits(OPCODE * op);

static int pin_name;

#line 103 "config_gram.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

/* Use api.header.include to #include this header
   instead of duplicating it here.  */
#ifndef YY_YY_CONFIG_GRAM_H_INCLUDED
# define YY_YY_CONFIG_GRAM_H_INCLUDED
/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif

/* Token kinds.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    YYEMPTY = -2,
    YYEOF = 0,                     /* "end of file"  */
    YYerror = 256,                 /* error  */
    YYUNDEF = 257,                 /* "invalid token"  */
    K_READ = 258,                  /* K_READ  */
    K_WRITE = 259,                 /* K_WRITE  */
    K_READ_LO = 260,               /* K_READ_LO  */
    K_READ_HI = 261,               /* K_READ_HI  */
    K_WRITE_LO = 262,              /* K_WRITE_LO  */
    K_WRITE_HI = 263,              /* K_WRITE_HI  */
    K_LOADPAGE_LO = 264,           /* K_LOADPAGE_LO  */
    K_LOADPAGE_HI = 265,           /* K_LOADPAGE_HI  */
    K_LOAD_EXT_ADDR = 266,         /* K_LOAD_EXT_ADDR  */
    K_WRITEPAGE = 267,             /* K_WRITEPAGE  */
    K_CHIP_ERASE = 268,            /* K_CHIP_ERASE  */
    K_PGM_ENABLE = 269,            /* K_PGM_ENABLE  */
    K_MEMORY = 270,                /* K_MEMORY  */
    K_PAGE_SIZE = 271,             /* K_PAGE_SIZE  */
    K_PAGED = 272,                 /* K_PAGED  */
    K_BAUDRATE = 273,              /* K_BAUDRATE  */
    K_BS2 = 274,                   /* K_BS2  */
    K_BUFF = 275,                  /* K_BUFF  */
    K_CHIP_ERASE_DELAY = 276,      /* K_CHIP_ERASE_DELAY  */
    K_CONNTYPE = 277,              /* K_CONNTYPE  */
    K_DEDICATED = 278,             /* K_DEDICATED  */
    K_DEFAULT_BITCLOCK = 279,      /* K_DEFAULT_BITCLOCK  */
    K_DEFAULT_PARALLEL = 280,      /* K_DEFAULT_PARALLEL  */
    K_DEFAULT_PROGRAMMER = 281,    /* K_DEFAULT_PROGRAMMER  */
    K_DEFAULT_SAFEMODE = 282,      /* K_DEFAULT_SAFEMODE  */
    K_DEFAULT_SERIAL = 283,        /* K_DEFAULT_SERIAL  */
    K_DESC = 284,                  /* K_DESC  */
    K_DEVICECODE = 285,            /* K_DEVICECODE  */
    K_STK500_DEVCODE = 286,        /* K_STK500_DEVCODE  */
    K_AVR910_DEVCODE = 287,        /* K_AVR910_DEVCODE  */
    K_EEPROM = 288,                /* K_EEPROM  */
    K_ERRLED = 289,                /* K_ERRLED  */
    K_FLASH = 290,                 /* K_FLASH  */
    K_ID = 291,                    /* K_ID  */
    K_IO = 292,                    /* K_IO  */
    K_LOADPAGE = 293,              /* K_LOADPAGE  */
    K_MAX_WRITE_DELAY = 294,       /* K_MAX_WRITE_DELAY  */
    K_MCU_BASE = 295,              /* K_MCU_BASE  */
    K_MIN_WRITE_DELAY = 296,       /* K_MIN_WRITE_DELAY  */
    K_MISO = 297,                  /* K_MISO  */
    K_MOSI = 298,                  /* K_MOSI  */
    K_NUM_PAGES = 299,             /* K_NUM_PAGES  */
    K_NVM_BASE = 300,              /* K_NVM_BASE  */
    K_OCDREV = 301,                /* K_OCDREV  */
    K_OFFSET = 302,                /* K_OFFSET  */
    K_PAGEL = 303,                 /* K_PAGEL  */
    K_PARALLEL = 304,              /* K_PARALLEL  */
    K_PARENT = 305,                /* K_PARENT  */
    K_PART = 306,                  /* K_PART  */
    K_PGMLED = 307,                /* K_PGMLED  */
    K_PROGRAMMER = 308,            /* K_PROGRAMMER  */
    K_PSEUDO = 309,                /* K_PSEUDO  */
    K_PWROFF_AFTER_WRITE = 310,    /* K_PWROFF_AFTER_WRITE  */
    K_RDYLED = 311,                /* K_RDYLED  */
    K_READBACK_P1 = 312,           /* K_READBACK_P1  */
    K_READBACK_P2 = 313,           /* K_READBACK_P2  */
    K_READMEM = 314,               /* K_READMEM  */
    K_RESET = 315,                 /* K_RESET  */
    K_RETRY_PULSE = 316,           /* K_RETRY_PULSE  */
    K_SERIAL = 317,                /* K_SERIAL  */
    K_SCK = 318,                   /* K_SCK  */
    K_SIGNATURE = 319,             /* K_SIGNATURE  */
    K_SIZE = 320,                  /* K_SIZE  */
    K_USB = 321,                   /* K_USB  */
    K_USBDEV = 322,                /* K_USBDEV  */
    K_USBSN = 323,                 /* K_USBSN  */
    K_USBPID = 324,                /* K_USBPID  */
    K_USBPRODUCT = 325,            /* K_USBPRODUCT  */
    K_USBVENDOR = 326,             /* K_USBVENDOR  */
    K_USBVID = 327,                /* K_USBVID  */
    K_TYPE = 328,                  /* K_TYPE  */
    K_VCC = 329,                   /* K_VCC  */
    K_VFYLED = 330,                /* K_VFYLED  */
    K_NO = 331,                    /* K_NO  */
    K_YES = 332,                   /* K_YES  */
    K_TIMEOUT = 333,               /* K_TIMEOUT  */
    K_STABDELAY = 334,             /* K_STABDELAY  */
    K_CMDEXEDELAY = 335,           /* K_CMDEXEDELAY  */
    K_HVSPCMDEXEDELAY = 336,       /* K_HVSPCMDEXEDELAY  */
    K_SYNCHLOOPS = 337,            /* K_SYNCHLOOPS  */
    K_BYTEDELAY = 338,             /* K_BYTEDELAY  */
    K_POLLVALUE = 339,             /* K_POLLVALUE  */
    K_POLLINDEX = 340,             /* K_POLLINDEX  */
    K_PREDELAY = 341,              /* K_PREDELAY  */
    K_POSTDELAY = 342,             /* K_POSTDELAY  */
    K_POLLMETHOD = 343,            /* K_POLLMETHOD  */
    K_MODE = 344,                  /* K_MODE  */
    K_DELAY = 345,                 /* K_DELAY  */
    K_BLOCKSIZE = 346,             /* K_BLOCKSIZE  */
    K_READSIZE = 347,              /* K_READSIZE  */
    K_HVENTERSTABDELAY = 348,      /* K_HVENTERSTABDELAY  */
    K_PROGMODEDELAY = 349,         /* K_PROGMODEDELAY  */
    K_LATCHCYCLES = 350,           /* K_LATCHCYCLES  */
    K_TOGGLEVTG = 351,             /* K_TOGGLEVTG  */
    K_POWEROFFDELAY = 352,         /* K_POWEROFFDELAY  */
    K_RESETDELAYMS = 353,          /* K_RESETDELAYMS  */
    K_RESETDELAYUS = 354,          /* K_RESETDELAYUS  */
    K_HVLEAVESTABDELAY = 355,      /* K_HVLEAVESTABDELAY  */
    K_RESETDELAY = 356,            /* K_RESETDELAY  */
    K_SYNCHCYCLES = 357,           /* K_SYNCHCYCLES  */
    K_HVCMDEXEDELAY = 358,         /* K_HVCMDEXEDELAY  */
    K_CHIPERASEPULSEWIDTH = 359,   /* K_CHIPERASEPULSEWIDTH  */
    K_CHIPERASEPOLLTIMEOUT = 360,  /* K_CHIPERASEPOLLTIMEOUT  */
    K_CHIPERASETIME = 361,         /* K_CHIPERASETIME  */
    K_PROGRAMFUSEPULSEWIDTH = 362, /* K_PROGRAMFUSEPULSEWIDTH  */
    K_PROGRAMFUSEPOLLTIMEOUT = 363, /* K_PROGRAMFUSEPOLLTIMEOUT  */
    K_PROGRAMLOCKPULSEWIDTH = 364, /* K_PROGRAMLOCKPULSEWIDTH  */
    K_PROGRAMLOCKPOLLTIMEOUT = 365, /* K_PROGRAMLOCKPOLLTIMEOUT  */
    K_PP_CONTROLSTACK = 366,       /* K_PP_CONTROLSTACK  */
    K_HVSP_CONTROLSTACK = 367,     /* K_HVSP_CONTROLSTACK  */
    K_ALLOWFULLPAGEBITSTREAM = 368, /* K_ALLOWFULLPAGEBITSTREAM  */
    K_ENABLEPAGEPROGRAMMING = 369, /* K_ENABLEPAGEPROGRAMMING  */
    K_HAS_JTAG = 370,              /* K_HAS_JTAG  */
    K_HAS_DW = 371,                /* K_HAS_DW  */
    K_HAS_PDI = 372,               /* K_HAS_PDI  */
    K_HAS_TPI = 373,               /* K_HAS_TPI  */
    K_IDR = 374,                   /* K_IDR  */
    K_IS_AT90S1200 = 375,          /* K_IS_AT90S1200  */
    K_IS_AVR32 = 376,              /* K_IS_AVR32  */
    K_RAMPZ = 377,                 /* K_RAMPZ  */
    K_SPMCR = 378,                 /* K_SPMCR  */
    K_EECR = 379,                  /* K_EECR  */
    K_FLASH_INSTR = 380,           /* K_FLASH_INSTR  */
    K_EEPROM_INSTR = 381,          /* K_EEPROM_INSTR  */
    TKN_COMMA = 382,               /* TKN_COMMA  */
    TKN_EQUAL = 383,               /* TKN_EQUAL  */
    TKN_SEMI = 384,                /* TKN_SEMI  */
    TKN_TILDE = 385,               /* TKN_TILDE  */
    TKN_LEFT_PAREN = 386,          /* TKN_LEFT_PAREN  */
    TKN_RIGHT_PAREN = 387,         /* TKN_RIGHT_PAREN  */
    TKN_NUMBER = 388,              /* TKN_NUMBER  */
    TKN_NUMBER_REAL = 389,         /* TKN_NUMBER_REAL  */
    TKN_STRING = 390               /* TKN_STRING  */
  };
  typedef enum yytokentype yytoken_kind_t;
#endif
/* Token kinds.  */
#define YYEMPTY -2
#define YYEOF 0
#define YYerror 256
#define YYUNDEF 257
#define K_READ 258
#define K_WRITE 259
#define K_READ_LO 260
#define K_READ_HI 261
#define K_WRITE_LO 262
#define K_WRITE_HI 263
#define K_LOADPAGE_LO 264
#define K_LOADPAGE_HI 265
#define K_LOAD_EXT_ADDR 266
#define K_WRITEPAGE 267
#define K_CHIP_ERASE 268
#define K_PGM_ENABLE 269
#define K_MEMORY 270
#define K_PAGE_SIZE 271
#define K_PAGED 272
#define K_BAUDRATE 273
#define K_BS2 274
#define K_BUFF 275
#define K_CHIP_ERASE_DELAY 276
#define K_CONNTYPE 277
#define K_DEDICATED 278
#define K_DEFAULT_BITCLOCK 279
#define K_DEFAULT_PARALLEL 280
#define K_DEFAULT_PROGRAMMER 281
#define K_DEFAULT_SAFEMODE 282
#define K_DEFAULT_SERIAL 283
#define K_DESC 284
#define K_DEVICECODE 285
#define K_STK500_DEVCODE 286
#define K_AVR910_DEVCODE 287
#define K_EEPROM 288
#define K_ERRLED 289
#define K_FLASH 290
#define K_ID 291
#define K_IO 292
#define K_LOADPAGE 293
#define K_MAX_WRITE_DELAY 294
#define K_MCU_BASE 295
#define K_MIN_WRITE_DELAY 296
#define K_MISO 297
#define K_MOSI 298
#define K_NUM_PAGES 299
#define K_NVM_BASE 300
#define K_OCDREV 301
#define K_OFFSET 302
#define K_PAGEL 303
#define K_PARALLEL 304
#define K_PARENT 305
#define K_PART 306
#define K_PGMLED 307
#define K_PROGRAMMER 308
#define K_PSEUDO 309
#define K_PWROFF_AFTER_WRITE 310
#define K_RDYLED 311
#define K_READBACK_P1 312
#define K_READBACK_P2 313
#define K_READMEM 314
#define K_RESET 315
#define K_RETRY_PULSE 316
#define K_SERIAL 317
#define K_SCK 318
#define K_SIGNATURE 319
#define K_SIZE 320
#define K_USB 321
#define K_USBDEV 322
#define K_USBSN 323
#define K_USBPID 324
#define K_USBPRODUCT 325
#define K_USBVENDOR 326
#define K_USBVID 327
#define K_TYPE 328
#define K_VCC 329
#define K_VFYLED 330
#define K_NO 331
#define K_YES 332
#define K_TIMEOUT 333
#define K_STABDELAY 334
#define K_CMDEXEDELAY 335
#define K_HVSPCMDEXEDELAY 336
#define K_SYNCHLOOPS 337
#define K_BYTEDELAY 338
#define K_POLLVALUE 339
#define K_POLLINDEX 340
#define K_PREDELAY 341
#define K_POSTDELAY 342
#define K_POLLMETHOD 343
#define K_MODE 344
#define K_DELAY 345
#define K_BLOCKSIZE 346
#define K_READSIZE 347
#define K_HVENTERSTABDELAY 348
#define K_PROGMODEDELAY 349
#define K_LATCHCYCLES 350
#define K_TOGGLEVTG 351
#define K_POWEROFFDELAY 352
#define K_RESETDELAYMS 353
#define K_RESETDELAYUS 354
#define K_HVLEAVESTABDELAY 355
#define K_RESETDELAY 356
#define K_SYNCHCYCLES 357
#define K_HVCMDEXEDELAY 358
#define K_CHIPERASEPULSEWIDTH 359
#define K_CHIPERASEPOLLTIMEOUT 360
#define K_CHIPERASETIME 361
#define K_PROGRAMFUSEPULSEWIDTH 362
#define K_PROGRAMFUSEPOLLTIMEOUT 363
#define K_PROGRAMLOCKPULSEWIDTH 364
#define K_PROGRAMLOCKPOLLTIMEOUT 365
#define K_PP_CONTROLSTACK 366
#define K_HVSP_CONTROLSTACK 367
#define K_ALLOWFULLPAGEBITSTREAM 368
#define K_ENABLEPAGEPROGRAMMING 369
#define K_HAS_JTAG 370
#define K_HAS_DW 371
#define K_HAS_PDI 372
#define K_HAS_TPI 373
#define K_IDR 374
#define K_IS_AT90S1200 375
#define K_IS_AVR32 376
#define K_RAMPZ 377
#define K_SPMCR 378
#define K_EECR 379
#define K_FLASH_INSTR 380
#define K_EEPROM_INSTR 381
#define TKN_COMMA 382
#define TKN_EQUAL 383
#define TKN_SEMI 384
#define TKN_TILDE 385
#define TKN_LEFT_PAREN 386
#define TKN_RIGHT_PAREN 387
#define TKN_NUMBER 388
#define TKN_NUMBER_REAL 389
#define TKN_STRING 390

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif


extern YYSTYPE yylval;


int yyparse (void);


#endif /* !YY_YY_CONFIG_GRAM_H_INCLUDED  */
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_K_READ = 3,                     /* K_READ  */
  YYSYMBOL_K_WRITE = 4,                    /* K_WRITE  */
  YYSYMBOL_K_READ_LO = 5,                  /* K_READ_LO  */
  YYSYMBOL_K_READ_HI = 6,                  /* K_READ_HI  */
  YYSYMBOL_K_WRITE_LO = 7,                 /* K_WRITE_LO  */
  YYSYMBOL_K_WRITE_HI = 8,                 /* K_WRITE_HI  */
  YYSYMBOL_K_LOADPAGE_LO = 9,              /* K_LOADPAGE_LO  */
  YYSYMBOL_K_LOADPAGE_HI = 10,             /* K_LOADPAGE_HI  */
  YYSYMBOL_K_LOAD_EXT_ADDR = 11,           /* K_LOAD_EXT_ADDR  */
  YYSYMBOL_K_WRITEPAGE = 12,               /* K_WRITEPAGE  */
  YYSYMBOL_K_CHIP_ERASE = 13,              /* K_CHIP_ERASE  */
  YYSYMBOL_K_PGM_ENABLE = 14,              /* K_PGM_ENABLE  */
  YYSYMBOL_K_MEMORY = 15,                  /* K_MEMORY  */
  YYSYMBOL_K_PAGE_SIZE = 16,               /* K_PAGE_SIZE  */
  YYSYMBOL_K_PAGED = 17,                   /* K_PAGED  */
  YYSYMBOL_K_BAUDRATE = 18,                /* K_BAUDRATE  */
  YYSYMBOL_K_BS2 = 19,                     /* K_BS2  */
  YYSYMBOL_K_BUFF = 20,                    /* K_BUFF  */
  YYSYMBOL_K_CHIP_ERASE_DELAY = 21,        /* K_CHIP_ERASE_DELAY  */
  YYSYMBOL_K_CONNTYPE = 22,                /* K_CONNTYPE  */
  YYSYMBOL_K_DEDICATED = 23,               /* K_DEDICATED  */
  YYSYMBOL_K_DEFAULT_BITCLOCK = 24,        /* K_DEFAULT_BITCLOCK  */
  YYSYMBOL_K_DEFAULT_PARALLEL = 25,        /* K_DEFAULT_PARALLEL  */
  YYSYMBOL_K_DEFAULT_PROGRAMMER = 26,      /* K_DEFAULT_PROGRAMMER  */
  YYSYMBOL_K_DEFAULT_SAFEMODE = 27,        /* K_DEFAULT_SAFEMODE  */
  YYSYMBOL_K_DEFAULT_SERIAL = 28,          /* K_DEFAULT_SERIAL  */
  YYSYMBOL_K_DESC = 29,                    /* K_DESC  */
  YYSYMBOL_K_DEVICECODE = 30,              /* K_DEVICECODE  */
  YYSYMBOL_K_STK500_DEVCODE = 31,          /* K_STK500_DEVCODE  */
  YYSYMBOL_K_AVR910_DEVCODE = 32,          /* K_AVR910_DEVCODE  */
  YYSYMBOL_K_EEPROM = 33,                  /* K_EEPROM  */
  YYSYMBOL_K_ERRLED = 34,                  /* K_ERRLED  */
  YYSYMBOL_K_FLASH = 35,                   /* K_FLASH  */
  YYSYMBOL_K_ID = 36,                      /* K_ID  */
  YYSYMBOL_K_IO = 37,                      /* K_IO  */
  YYSYMBOL_K_LOADPAGE = 38,                /* K_LOADPAGE  */
  YYSYMBOL_K_MAX_WRITE_DELAY = 39,         /* K_MAX_WRITE_DELAY  */
  YYSYMBOL_K_MCU_BASE = 40,                /* K_MCU_BASE  */
  YYSYMBOL_K_MIN_WRITE_DELAY = 41,         /* K_MIN_WRITE_DELAY  */
  YYSYMBOL_K_MISO = 42,                    /* K_MISO  */
  YYSYMBOL_K_MOSI = 43,                    /* K_MOSI  */
  YYSYMBOL_K_NUM_PAGES = 44,               /* K_NUM_PAGES  */
  YYSYMBOL_K_NVM_BASE = 45,                /* K_NVM_BASE  */
  YYSYMBOL_K_OCDREV = 46,                  /* K_OCDREV  */
  YYSYMBOL_K_OFFSET = 47,                  /* K_OFFSET  */
  YYSYMBOL_K_PAGEL = 48,                   /* K_PAGEL  */
  YYSYMBOL_K_PARALLEL = 49,                /* K_PARALLEL  */
  YYSYMBOL_K_PARENT = 50,                  /* K_PARENT  */
  YYSYMBOL_K_PART = 51,                    /* K_PART  */
  YYSYMBOL_K_PGMLED = 52,                  /* K_PGMLED  */
  YYSYMBOL_K_PROGRAMMER = 53,              /* K_PROGRAMMER  */
  YYSYMBOL_K_PSEUDO = 54,                  /* K_PSEUDO  */
  YYSYMBOL_K_PWROFF_AFTER_WRITE = 55,      /* K_PWROFF_AFTER_WRITE  */
  YYSYMBOL_K_RDYLED = 56,                  /* K_RDYLED  */
  YYSYMBOL_K_READBACK_P1 = 57,             /* K_READBACK_P1  */
  YYSYMBOL_K_READBACK_P2 = 58,             /* K_READBACK_P2  */
  YYSYMBOL_K_READMEM = 59,                 /* K_READMEM  */
  YYSYMBOL_K_RESET = 60,                   /* K_RESET  */
  YYSYMBOL_K_RETRY_PULSE = 61,             /* K_RETRY_PULSE  */
  YYSYMBOL_K_SERIAL = 62,                  /* K_SERIAL  */
  YYSYMBOL_K_SCK = 63,                     /* K_SCK  */
  YYSYMBOL_K_SIGNATURE = 64,               /* K_SIGNATURE  */
  YYSYMBOL_K_SIZE = 65,                    /* K_SIZE  */
  YYSYMBOL_K_USB = 66,                     /* K_USB  */
  YYSYMBOL_K_USBDEV = 67,                  /* K_USBDEV  */
  YYSYMBOL_K_USBSN = 68,                   /* K_USBSN  */
  YYSYMBOL_K_USBPID = 69,                  /* K_USBPID  */
  YYSYMBOL_K_USBPRODUCT = 70,              /* K_USBPRODUCT  */
  YYSYMBOL_K_USBVENDOR = 71,               /* K_USBVENDOR  */
  YYSYMBOL_K_USBVID = 72,                  /* K_USBVID  */
  YYSYMBOL_K_TYPE = 73,                    /* K_TYPE  */
  YYSYMBOL_K_VCC = 74,                     /* K_VCC  */
  YYSYMBOL_K_VFYLED = 75,                  /* K_VFYLED  */
  YYSYMBOL_K_NO = 76,                      /* K_NO  */
  YYSYMBOL_K_YES = 77,                     /* K_YES  */
  YYSYMBOL_K_TIMEOUT = 78,                 /* K_TIMEOUT  */
  YYSYMBOL_K_STABDELAY = 79,               /* K_STABDELAY  */
  YYSYMBOL_K_CMDEXEDELAY = 80,             /* K_CMDEXEDELAY  */
  YYSYMBOL_K_HVSPCMDEXEDELAY = 81,         /* K_HVSPCMDEXEDELAY  */
  YYSYMBOL_K_SYNCHLOOPS = 82,              /* K_SYNCHLOOPS  */
  YYSYMBOL_K_BYTEDELAY = 83,               /* K_BYTEDELAY  */
  YYSYMBOL_K_POLLVALUE = 84,               /* K_POLLVALUE  */
  YYSYMBOL_K_POLLINDEX = 85,               /* K_POLLINDEX  */
  YYSYMBOL_K_PREDELAY = 86,                /* K_PREDELAY  */
  YYSYMBOL_K_POSTDELAY = 87,               /* K_POSTDELAY  */
  YYSYMBOL_K_POLLMETHOD = 88,              /* K_POLLMETHOD  */
  YYSYMBOL_K_MODE = 89,                    /* K_MODE  */
  YYSYMBOL_K_DELAY = 90,                   /* K_DELAY  */
  YYSYMBOL_K_BLOCKSIZE = 91,               /* K_BLOCKSIZE  */
  YYSYMBOL_K_READSIZE = 92,                /* K_READSIZE  */
  YYSYMBOL_K_HVENTERSTABDELAY = 93,        /* K_HVENTERSTABDELAY  */
  YYSYMBOL_K_PROGMODEDELAY = 94,           /* K_PROGMODEDELAY  */
  YYSYMBOL_K_LATCHCYCLES = 95,             /* K_LATCHCYCLES  */
  YYSYMBOL_K_TOGGLEVTG = 96,               /* K_TOGGLEVTG  */
  YYSYMBOL_K_POWEROFFDELAY = 97,           /* K_POWEROFFDELAY  */
  YYSYMBOL_K_RESETDELAYMS = 98,            /* K_RESETDELAYMS  */
  YYSYMBOL_K_RESETDELAYUS = 99,            /* K_RESETDELAYUS  */
  YYSYMBOL_K_HVLEAVESTABDELAY = 100,       /* K_HVLEAVESTABDELAY  */
  YYSYMBOL_K_RESETDELAY = 101,             /* K_RESETDELAY  */
  YYSYMBOL_K_SYNCHCYCLES = 102,            /* K_SYNCHCYCLES  */
  YYSYMBOL_K_HVCMDEXEDELAY = 103,          /* K_HVCMDEXEDELAY  */
  YYSYMBOL_K_CHIPERASEPULSEWIDTH = 104,    /* K_CHIPERASEPULSEWIDTH  */
  YYSYMBOL_K_CHIPERASEPOLLTIMEOUT = 105,   /* K_CHIPERASEPOLLTIMEOUT  */
  YYSYMBOL_K_CHIPERASETIME = 106,          /* K_CHIPERASETIME  */
  YYSYMBOL_K_PROGRAMFUSEPULSEWIDTH = 107,  /* K_PROGRAMFUSEPULSEWIDTH  */
  YYSYMBOL_K_PROGRAMFUSEPOLLTIMEOUT = 108, /* K_PROGRAMFUSEPOLLTIMEOUT  */
  YYSYMBOL_K_PROGRAMLOCKPULSEWIDTH = 109,  /* K_PROGRAMLOCKPULSEWIDTH  */
  YYSYMBOL_K_PROGRAMLOCKPOLLTIMEOUT = 110, /* K_PROGRAMLOCKPOLLTIMEOUT  */
  YYSYMBOL_K_PP_CONTROLSTACK = 111,        /* K_PP_CONTROLSTACK  */
  YYSYMBOL_K_HVSP_CONTROLSTACK = 112,      /* K_HVSP_CONTROLSTACK  */
  YYSYMBOL_K_ALLOWFULLPAGEBITSTREAM = 113, /* K_ALLOWFULLPAGEBITSTREAM  */
  YYSYMBOL_K_ENABLEPAGEPROGRAMMING = 114,  /* K_ENABLEPAGEPROGRAMMING  */
  YYSYMBOL_K_HAS_JTAG = 115,               /* K_HAS_JTAG  */
  YYSYMBOL_K_HAS_DW = 116,                 /* K_HAS_DW  */
  YYSYMBOL_K_HAS_PDI = 117,                /* K_HAS_PDI  */
  YYSYMBOL_K_HAS_TPI = 118,                /* K_HAS_TPI  */
  YYSYMBOL_K_IDR = 119,                    /* K_IDR  */
  YYSYMBOL_K_IS_AT90S1200 = 120,           /* K_IS_AT90S1200  */
  YYSYMBOL_K_IS_AVR32 = 121,               /* K_IS_AVR32  */
  YYSYMBOL_K_RAMPZ = 122,                  /* K_RAMPZ  */
  YYSYMBOL_K_SPMCR = 123,                  /* K_SPMCR  */
  YYSYMBOL_K_EECR = 124,                   /* K_EECR  */
  YYSYMBOL_K_FLASH_INSTR = 125,            /* K_FLASH_INSTR  */
  YYSYMBOL_K_EEPROM_INSTR = 126,           /* K_EEPROM_INSTR  */
  YYSYMBOL_TKN_COMMA = 127,                /* TKN_COMMA  */
  YYSYMBOL_TKN_EQUAL = 128,                /* TKN_EQUAL  */
  YYSYMBOL_TKN_SEMI = 129,                 /* TKN_SEMI  */
  YYSYMBOL_TKN_TILDE = 130,                /* TKN_TILDE  */
  YYSYMBOL_TKN_LEFT_PAREN = 131,           /* TKN_LEFT_PAREN  */
  YYSYMBOL_TKN_RIGHT_PAREN = 132,          /* TKN_RIGHT_PAREN  */
  YYSYMBOL_TKN_NUMBER = 133,               /* TKN_NUMBER  */
  YYSYMBOL_TKN_NUMBER_REAL = 134,          /* TKN_NUMBER_REAL  */
  YYSYMBOL_TKN_STRING = 135,               /* TKN_STRING  */
  YYSYMBOL_YYACCEPT = 136,                 /* $accept  */
  YYSYMBOL_number_real = 137,              /* number_real  */
  YYSYMBOL_configuration = 138,            /* configuration  */
  YYSYMBOL_config = 139,                   /* config  */
  YYSYMBOL_def = 140,                      /* def  */
  YYSYMBOL_prog_def = 141,                 /* prog_def  */
  YYSYMBOL_prog_decl = 142,                /* prog_decl  */
  YYSYMBOL_part_def = 143,                 /* part_def  */
  YYSYMBOL_part_decl = 144,                /* part_decl  */
  YYSYMBOL_string_list = 145,              /* string_list  */
  YYSYMBOL_num_list = 146,                 /* num_list  */
  YYSYMBOL_prog_parms = 147,               /* prog_parms  */
  YYSYMBOL_prog_parm = 148,                /* prog_parm  */
  YYSYMBOL_prog_parm_type = 149,           /* prog_parm_type  */
  YYSYMBOL_prog_parm_type_id = 150,        /* prog_parm_type_id  */
  YYSYMBOL_prog_parm_conntype = 151,       /* prog_parm_conntype  */
  YYSYMBOL_prog_parm_conntype_id = 152,    /* prog_parm_conntype_id  */
  YYSYMBOL_prog_parm_usb = 153,            /* prog_parm_usb  */
  YYSYMBOL_usb_pid_list = 154,             /* usb_pid_list  */
  YYSYMBOL_pin_number_non_empty = 155,     /* pin_number_non_empty  */
  YYSYMBOL_pin_number = 156,               /* pin_number  */
  YYSYMBOL_pin_list_element = 157,         /* pin_list_element  */
  YYSYMBOL_pin_list_non_empty = 158,       /* pin_list_non_empty  */
  YYSYMBOL_pin_list = 159,                 /* pin_list  */
  YYSYMBOL_prog_parm_pins = 160,           /* prog_parm_pins  */
  YYSYMBOL_161_1 = 161,                    /* $@1  */
  YYSYMBOL_162_2 = 162,                    /* $@2  */
  YYSYMBOL_163_3 = 163,                    /* $@3  */
  YYSYMBOL_164_4 = 164,                    /* $@4  */
  YYSYMBOL_165_5 = 165,                    /* $@5  */
  YYSYMBOL_166_6 = 166,                    /* $@6  */
  YYSYMBOL_167_7 = 167,                    /* $@7  */
  YYSYMBOL_168_8 = 168,                    /* $@8  */
  YYSYMBOL_169_9 = 169,                    /* $@9  */
  YYSYMBOL_170_10 = 170,                   /* $@10  */
  YYSYMBOL_opcode = 171,                   /* opcode  */
  YYSYMBOL_part_parms = 172,               /* part_parms  */
  YYSYMBOL_reset_disposition = 173,        /* reset_disposition  */
  YYSYMBOL_parallel_modes = 174,           /* parallel_modes  */
  YYSYMBOL_retry_lines = 175,              /* retry_lines  */
  YYSYMBOL_part_parm = 176,                /* part_parm  */
  YYSYMBOL_177_11 = 177,                   /* $@11  */
  YYSYMBOL_yesno = 178,                    /* yesno  */
  YYSYMBOL_mem_specs = 179,                /* mem_specs  */
  YYSYMBOL_mem_spec = 180                  /* mem_spec  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned
# endif
#endif

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YY_USE(E) ((void) (E))
#else
# define YY_USE(E) /* empty */
#endif

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif

#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* !defined yyoverflow */

#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_T yyi;                      \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  22
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   401

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  136
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  45
/* YYNRULES -- Number of rules.  */
#define YYNRULES  182
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  418

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   390


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_uint8 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,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
     135
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   211,   211,   217,   221,   222,   226,   227,   232,   234,
     236,   242,   248,   254,   259,   270,   303,   313,   335,   393,
     403,   426,   427,   432,   433,   437,   438,   442,   465,   467,
     469,   471,   473,   478,   487,   491,   501,   509,   513,   514,
     515,   519,   526,   532,   533,   540,   547,   557,   572,   585,
     587,   591,   593,   597,   599,   603,   605,   610,   612,   616,
     616,   617,   617,   618,   618,   619,   619,   620,   620,   621,
     621,   622,   622,   623,   623,   624,   624,   625,   625,   629,
     630,   631,   632,   633,   634,   635,   636,   637,   638,   639,
     640,   645,   646,   651,   651,   655,   655,   659,   659,   663,
     670,   677,   685,   692,   699,   710,   717,   748,   779,   809,
     839,   845,   851,   857,   867,   873,   879,   885,   891,   897,
     903,   909,   915,   921,   927,   933,   939,   945,   951,   957,
     963,   969,   975,   981,   987,   993,   999,  1005,  1011,  1017,
    1023,  1029,  1035,  1045,  1055,  1065,  1075,  1085,  1095,  1105,
    1115,  1121,  1127,  1133,  1139,  1145,  1151,  1157,  1167,  1186,
    1210,  1209,  1234,  1261,  1261,  1266,  1267,  1272,  1278,  1285,
    1291,  1297,  1303,  1309,  1315,  1321,  1327,  1334,  1340,  1346,
    1352,  1358,  1365
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "K_READ", "K_WRITE",
  "K_READ_LO", "K_READ_HI", "K_WRITE_LO", "K_WRITE_HI", "K_LOADPAGE_LO",
  "K_LOADPAGE_HI", "K_LOAD_EXT_ADDR", "K_WRITEPAGE", "K_CHIP_ERASE",
  "K_PGM_ENABLE", "K_MEMORY", "K_PAGE_SIZE", "K_PAGED", "K_BAUDRATE",
  "K_BS2", "K_BUFF", "K_CHIP_ERASE_DELAY", "K_CONNTYPE", "K_DEDICATED",
  "K_DEFAULT_BITCLOCK", "K_DEFAULT_PARALLEL", "K_DEFAULT_PROGRAMMER",
  "K_DEFAULT_SAFEMODE", "K_DEFAULT_SERIAL", "K_DESC", "K_DEVICECODE",
  "K_STK500_DEVCODE", "K_AVR910_DEVCODE", "K_EEPROM", "K_ERRLED",
  "K_FLASH", "K_ID", "K_IO", "K_LOADPAGE", "K_MAX_WRITE_DELAY",
  "K_MCU_BASE", "K_MIN_WRITE_DELAY", "K_MISO", "K_MOSI", "K_NUM_PAGES",
  "K_NVM_BASE", "K_OCDREV", "K_OFFSET", "K_PAGEL", "K_PARALLEL",
  "K_PARENT", "K_PART", "K_PGMLED", "K_PROGRAMMER", "K_PSEUDO",
  "K_PWROFF_AFTER_WRITE", "K_RDYLED", "K_READBACK_P1", "K_READBACK_P2",
  "K_READMEM", "K_RESET", "K_RETRY_PULSE", "K_SERIAL", "K_SCK",
  "K_SIGNATURE", "K_SIZE", "K_USB", "K_USBDEV", "K_USBSN", "K_USBPID",
  "K_USBPRODUCT", "K_USBVENDOR", "K_USBVID", "K_TYPE", "K_VCC", "K_VFYLED",
  "K_NO", "K_YES", "K_TIMEOUT", "K_STABDELAY", "K_CMDEXEDELAY",
  "K_HVSPCMDEXEDELAY", "K_SYNCHLOOPS", "K_BYTEDELAY", "K_POLLVALUE",
  "K_POLLINDEX", "K_PREDELAY", "K_POSTDELAY", "K_POLLMETHOD", "K_MODE",
  "K_DELAY", "K_BLOCKSIZE", "K_READSIZE", "K_HVENTERSTABDELAY",
  "K_PROGMODEDELAY", "K_LATCHCYCLES", "K_TOGGLEVTG", "K_POWEROFFDELAY",
  "K_RESETDELAYMS", "K_RESETDELAYUS", "K_HVLEAVESTABDELAY", "K_RESETDELAY",
  "K_SYNCHCYCLES", "K_HVCMDEXEDELAY", "K_CHIPERASEPULSEWIDTH",
  "K_CHIPERASEPOLLTIMEOUT", "K_CHIPERASETIME", "K_PROGRAMFUSEPULSEWIDTH",
  "K_PROGRAMFUSEPOLLTIMEOUT", "K_PROGRAMLOCKPULSEWIDTH",
  "K_PROGRAMLOCKPOLLTIMEOUT", "K_PP_CONTROLSTACK", "K_HVSP_CONTROLSTACK",
  "K_ALLOWFULLPAGEBITSTREAM", "K_ENABLEPAGEPROGRAMMING", "K_HAS_JTAG",
  "K_HAS_DW", "K_HAS_PDI", "K_HAS_TPI", "K_IDR", "K_IS_AT90S1200",
  "K_IS_AVR32", "K_RAMPZ", "K_SPMCR", "K_EECR", "K_FLASH_INSTR",
  "K_EEPROM_INSTR", "TKN_COMMA", "TKN_EQUAL", "TKN_SEMI", "TKN_TILDE",
  "TKN_LEFT_PAREN", "TKN_RIGHT_PAREN", "TKN_NUMBER", "TKN_NUMBER_REAL",
  "TKN_STRING", "$accept", "number_real", "configuration", "config", "def",
  "prog_def", "prog_decl", "part_def", "part_decl", "string_list",
  "num_list", "prog_parms", "prog_parm", "prog_parm_type",
  "prog_parm_type_id", "prog_parm_conntype", "prog_parm_conntype_id",
  "prog_parm_usb", "usb_pid_list", "pin_number_non_empty", "pin_number",
  "pin_list_element", "pin_list_non_empty", "pin_list", "prog_parm_pins",
  "$@1", "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10",
  "opcode", "part_parms", "reset_disposition", "parallel_modes",
  "retry_lines", "part_parm", "$@11", "yesno", "mem_specs", "mem_spec", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-258)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-1)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
      23,  -119,   -83,   -82,   -68,   -50,     2,    31,    82,    23,
    -258,   -39,    55,   -37,   166,   -99,   -42,   -41,   -63,   -40,
     -35,   -34,  -258,  -258,  -258,   -43,   -32,   -26,   -20,   -19,
     -18,   -15,   -14,   -12,   -11,    -9,    -8,    -7,     3,     5,
       6,     7,     8,     9,    10,    12,    55,    13,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,    -3,    15,    17,    18,    20,
      22,    24,    25,    26,    27,    28,    29,    30,    32,    33,
      34,    35,    37,    38,    39,    54,    56,    58,    60,    61,
      62,    63,    64,    65,    66,    71,    72,    73,    76,    77,
      79,    81,    85,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,   101,   103,   104,   105,   106,   108,   109,
     110,   111,   112,   113,   114,   115,   127,   128,   166,   129,
    -258,  -258,   140,   164,   165,  -258,  -258,   167,   168,  -258,
    -258,    16,  -258,    21,    48,  -258,    75,  -258,  -258,  -258,
    -258,  -258,  -258,   122,   160,   169,   163,   170,   171,     4,
    -258,  -258,   172,  -258,  -258,   173,   174,   175,   176,   178,
     179,   180,   181,   183,   184,   185,   -44,    19,   -52,   -63,
     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
     216,   216,   -63,   -63,   -63,   -63,   -63,   -63,   217,   -63,
     -63,   218,   219,   220,   216,   216,    75,   225,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,   -76,  -258,  -258,  -258,  -258,
    -258,   -71,  -258,   228,   -71,   -71,   -71,   -71,   -71,   -71,
    -258,  -258,  -258,   229,  -258,  -258,  -258,  -258,  -258,  -258,
     -76,   -71,  -258,    14,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,   224,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,   231,   231,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
     231,   231,   228,  -258,   -45,  -258,  -258,  -258,   232,  -258,
     227,  -258,  -258,   226,  -258,  -258,  -258,  -258,  -258,  -258,
     230,  -258,  -258,   234,   236,   237,   238,   239,   240,   241,
     242,   243,   244,   245,   246,   247,   248,   249,   250,    14,
     251,   252,   253,   216,  -258,   -76,  -258,  -258,   254,   -63,
     255,   256,   257,   258,   -63,   259,   260,   261,   262,   263,
     264,   265,   266,    75,   271,  -258,  -258,  -258,  -120,  -258,
    -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,   228,  -258,  -258
};

/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
   Performed when YYTABLE does not specify something else to do.  Zero
   means the default is an error.  */
static const yytype_uint8 yydefact[] =
{
       4,     0,     0,     0,     0,     0,    19,    16,     0,     5,
       6,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     1,     7,     8,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    15,     0,    28,    31,
      30,    29,     9,    79,    80,    81,    82,    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,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    18,     0,
       2,     3,     0,     0,     0,   164,   163,     0,     0,    20,
      17,     0,    61,     0,     0,    71,     0,    69,    67,    75,
      73,    63,    65,     0,     0,     0,     0,     0,     0,     0,
      59,    77,     0,    25,   160,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    91,    13,
      11,    10,    14,    12,    33,    58,    38,    39,    40,    37,
      32,    52,    21,    27,    52,    52,    52,    52,    52,    52,
      41,    44,    47,    43,    46,    45,    42,    36,    35,    34,
      58,    52,    26,     0,   112,   110,   100,   101,   102,   103,
      99,   154,   155,   156,   111,    96,   158,    95,    93,    94,
     113,    97,    98,   159,   157,     0,   105,   114,   115,   116,
     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
     127,   128,   129,   130,   131,   132,   133,   141,   134,   135,
     136,   137,   138,   139,   140,    23,   106,   107,   148,   149,
     142,   143,   144,   145,   150,   146,   147,   151,   152,   153,
     108,   109,   162,    92,     0,    49,    53,    55,    57,    62,
       0,    51,    72,     0,    70,    68,    76,    74,    64,    66,
       0,    60,    78,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   161,
       0,     0,     0,     0,    50,     0,    22,    48,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   165,   104,    24,     0,    56,
     169,   167,   173,   172,   170,   171,   174,   175,   176,   168,
     181,   177,   178,   179,   180,   182,   166,    54
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -258,  -258,  -258,  -258,   132,  -258,  -258,  -258,  -258,  -225,
    -209,  -258,   267,  -258,  -258,  -258,  -258,  -258,  -258,  -231,
    -181,  -228,  -258,  -109,  -258,  -258,  -258,  -258,  -258,  -258,
    -258,  -258,  -258,  -258,  -258,  -257,  -258,  -258,  -258,  -258,
     273,  -258,  -176,  -258,  -210
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
       0,   132,     8,     9,    10,    11,    12,    13,    14,   243,
     316,    46,    47,    48,   259,    49,   239,    50,   253,   341,
     342,   337,   338,   339,    51,   260,   235,   248,   249,   245,
     244,   241,   247,   246,   261,   127,   128,   280,   276,   283,
     129,   263,   137,   369,   370
};

/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule whose
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_int16 yytable[] =
{
     277,   332,   317,   284,   336,   257,   368,   372,   281,    15,
     275,   282,   417,   135,   136,   330,   331,    53,    54,    55,
      56,    57,    58,    59,    60,    61,    62,    63,    64,   336,
     353,   354,   135,   136,   130,   131,   318,   319,   320,   321,
     322,   323,   278,   325,   326,    16,    17,     1,     2,     3,
       4,     5,    20,   355,   334,   356,   279,   335,   357,   340,
      18,   358,   335,   344,   345,   346,   347,   348,   349,   359,
     236,   360,   361,    25,     6,    26,     7,    27,    19,   362,
     352,    21,    22,   237,    28,   141,   373,   238,   374,    29,
      24,    30,    52,   133,   134,   138,   142,    31,    32,   363,
     139,   140,   143,   364,   365,   366,   367,    33,   144,   145,
     146,    34,   368,   147,   148,    35,   149,   150,    36,   151,
     152,   153,    37,    38,    39,    40,    41,    42,    43,    44,
      45,   154,   164,   155,   156,   157,   158,   159,   160,   258,
     161,    23,   163,   165,   336,   166,   167,   399,   168,   234,
     169,   351,   170,   171,   172,   173,   174,   175,   176,   394,
     177,   178,   179,   180,   398,   181,   182,   183,   415,    53,
      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
      64,    65,   184,   240,   185,    66,   186,    67,   187,   188,
     189,   190,   191,   192,   193,    68,    69,    70,    71,   194,
     195,   196,    72,   401,   197,   198,    73,   199,   406,   200,
     242,    74,    75,   201,    76,    77,   202,   203,   204,   205,
     206,   207,   208,   209,   210,   211,    78,    79,    80,   212,
      81,   213,   214,   215,   216,    82,   217,   218,   219,   220,
     221,   222,   223,   224,    83,    84,    85,    86,    87,    88,
      89,    90,    91,    92,    93,   225,   226,   250,   228,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   229,
     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
     124,   125,   126,   230,   231,   251,   232,   233,   254,     0,
       0,   262,   252,     0,   256,   255,   264,   265,     0,   267,
     266,   268,   269,   162,   271,   270,   272,   273,   274,   285,
     286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
     296,   297,   298,   299,   300,   301,   302,   303,   304,   305,
     306,   307,   308,   309,   310,   311,   312,   313,   314,   315,
     324,   327,   328,   329,   333,   343,   350,   371,   372,   375,
     374,   376,   378,   377,   379,   380,   381,   382,   383,   384,
     385,   386,   387,   388,   389,   390,   391,   392,   393,     0,
     395,     0,     0,     0,     0,   396,   397,   400,   402,   403,
     404,   405,   407,   408,   409,   410,   411,   412,   413,   414,
     416,   227
};

static const yytype_int16 yycheck[] =
{
     176,   226,   211,   179,   235,     1,   263,   127,    60,   128,
      54,    63,   132,    76,    77,   224,   225,     3,     4,     5,
       6,     7,     8,     9,    10,    11,    12,    13,    14,   260,
      16,    17,    76,    77,   133,   134,   212,   213,   214,   215,
     216,   217,    23,   219,   220,   128,   128,    24,    25,    26,
      27,    28,    50,    39,   130,    41,    37,   133,    44,   130,
     128,    47,   133,   244,   245,   246,   247,   248,   249,    55,
      49,    57,    58,    18,    51,    20,    53,    22,   128,    65,
     261,    50,     0,    62,    29,   128,   131,    66,   133,    34,
     129,    36,   129,   135,   135,   135,   128,    42,    43,    85,
     135,   135,   128,    89,    90,    91,    92,    52,   128,   128,
     128,    56,   369,   128,   128,    60,   128,   128,    63,   128,
     128,   128,    67,    68,    69,    70,    71,    72,    73,    74,
      75,   128,   135,   128,   128,   128,   128,   128,   128,   135,
     128,     9,   129,   128,   375,   128,   128,   375,   128,   133,
     128,   260,   128,   128,   128,   128,   128,   128,   128,   369,
     128,   128,   128,   128,   373,   128,   128,   128,   393,     3,
       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
      14,    15,   128,   135,   128,    19,   128,    21,   128,   128,
     128,   128,   128,   128,   128,    29,    30,    31,    32,   128,
     128,   128,    36,   379,   128,   128,    40,   128,   384,   128,
     135,    45,    46,   128,    48,    49,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,    60,    61,    62,   128,
      64,   128,   128,   128,   128,    69,   128,   128,   128,   128,
     128,   128,   128,   128,    78,    79,    80,    81,    82,    83,
      84,    85,    86,    87,    88,   128,   128,   135,   129,    93,
      94,    95,    96,    97,    98,    99,   100,   101,   102,   129,
     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
     124,   125,   126,   129,   129,   135,   129,   129,   135,    -1,
      -1,   129,   133,    -1,   133,   135,   133,   133,    -1,   133,
     135,   133,   133,    46,   133,   135,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   129,   127,   127,   133,   127,   127,
     133,   135,   128,   133,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,    -1,
     129,    -1,    -1,    -1,    -1,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     129,   128
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,    24,    25,    26,    27,    28,    51,    53,   138,   139,
     140,   141,   142,   143,   144,   128,   128,   128,   128,   128,
      50,    50,     0,   140,   129,    18,    20,    22,    29,    34,
      36,    42,    43,    52,    56,    60,    63,    67,    68,    69,
      70,    71,    72,    73,    74,    75,   147,   148,   149,   151,
     153,   160,   129,     3,     4,     5,     6,     7,     8,     9,
      10,    11,    12,    13,    14,    15,    19,    21,    29,    30,
      31,    32,    36,    40,    45,    46,    48,    49,    60,    61,
      62,    64,    69,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    93,    94,    95,    96,    97,    98,
      99,   100,   101,   102,   104,   105,   106,   107,   108,   109,
     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
     120,   121,   122,   123,   124,   125,   126,   171,   172,   176,
     133,   134,   137,   135,   135,    76,    77,   178,   135,   135,
     135,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   148,   129,   135,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   176,   129,   129,
     129,   129,   129,   129,   133,   162,    49,    62,    66,   152,
     135,   167,   135,   145,   166,   165,   169,   168,   163,   164,
     135,   135,   133,   154,   135,   135,   133,     1,   135,   150,
     161,   170,   129,   177,   133,   133,   135,   133,   133,   133,
     135,   133,   133,   133,   133,    54,   174,   178,    23,    37,
     173,    60,    63,   175,   178,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   133,   133,   133,   133,   133,   146,   146,   178,   178,
     178,   178,   178,   178,   133,   178,   178,   133,   133,   133,
     146,   146,   145,   129,   130,   133,   155,   157,   158,   159,
     130,   155,   156,   127,   156,   156,   156,   156,   156,   156,
     127,   159,   156,    16,    17,    39,    41,    44,    47,    55,
      57,    58,    65,    85,    89,    90,    91,    92,   171,   179,
     180,   133,   127,   131,   133,   127,   135,   133,   128,   128,
     128,   128,   128,   128,   128,   128,   128,   128,   128,   128,
     128,   128,   128,   128,   180,   129,   133,   133,   146,   157,
     133,   178,   133,   133,   133,   133,   178,   133,   133,   133,
     133,   133,   133,   133,   133,   145,   129,   132
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_uint8 yyr1[] =
{
       0,   136,   137,   137,   138,   138,   139,   139,   140,   140,
     140,   140,   140,   140,   140,   141,   142,   142,   143,   144,
     144,   145,   145,   146,   146,   147,   147,   148,   148,   148,
     148,   148,   148,   148,   149,   150,   150,   151,   152,   152,
     152,   153,   153,   153,   153,   153,   153,   154,   154,   155,
     155,   156,   156,   157,   157,   158,   158,   159,   159,   161,
     160,   162,   160,   163,   160,   164,   160,   165,   160,   166,
     160,   167,   160,   168,   160,   169,   160,   170,   160,   171,
     171,   171,   171,   171,   171,   171,   171,   171,   171,   171,
     171,   172,   172,   173,   173,   174,   174,   175,   175,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
     177,   176,   176,   178,   178,   179,   179,   180,   180,   180,
     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
     180,   180,   180
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     1,     1,     0,     1,     1,     2,     2,     2,
       4,     4,     4,     4,     4,     2,     1,     3,     2,     1,
       3,     1,     3,     1,     3,     2,     3,     3,     1,     1,
       1,     1,     3,     3,     3,     1,     1,     3,     1,     1,
       1,     3,     3,     3,     3,     3,     3,     1,     3,     1,
       2,     1,     0,     1,     4,     1,     3,     1,     0,     0,
       4,     0,     4,     0,     4,     0,     4,     0,     4,     0,
       4,     0,     4,     0,     4,     0,     4,     0,     4,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     2,     3,     1,     1,     1,     1,     1,     1,     3,
       3,     3,     3,     3,     5,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       0,     4,     3,     1,     1,     2,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3
};


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYNOMEM         goto yyexhaustedlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                    \
  do                                                              \
    if (yychar == YYEMPTY)                                        \
      {                                                           \
        yychar = (Token);                                         \
        yylval = (Value);                                         \
        YYPOPSTACK (yylen);                                       \
        yystate = *yyssp;                                         \
        goto yybackup;                                            \
      }                                                           \
    else                                                          \
      {                                                           \
        yyerror (YY_("syntax error: cannot back up")); \
        YYERROR;                                                  \
      }                                                           \
  while (0)

/* Backward compatibility with an undocumented macro.
   Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)




# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*-----------------------------------.
| Print this symbol's value on YYO.  |
`-----------------------------------*/

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/*---------------------------.
| Print this symbol on YYO.  |
`---------------------------*/

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep);
  YYFPRINTF (yyo, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)]);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, Rule); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

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

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif






/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
  YY_USE (yyvaluep);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




/*----------.
| yyparse.  |
`----------*/

int
yyparse (void)
{
    yy_state_fast_t yystate = 0;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus = 0;

    /* Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yychar = YYEMPTY; /* Cause a token to be read.  */

  goto yysetstate;


/*------------------------------------------------------------.
| yynewstate -- push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;


/*--------------------------------------------------------------------.
| yysetstate -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined yyoverflow
      {
        /* Give user a chance to reallocate the stack.  Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;


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

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

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

  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = YYEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == YYerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = YYUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

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

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = YYEMPTY;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 2: /* number_real: TKN_NUMBER  */
#line 211 "../avrdude-6.3/config_gram.y"
            {
    yyval = yyvsp[0];
    /* convert value to real */
    yyval->value.number_real = yyval->value.number;
    yyval->value.type = V_NUM_REAL;
  }
#line 1888 "config_gram.c"
    break;

  case 3: /* number_real: TKN_NUMBER_REAL  */
#line 217 "../avrdude-6.3/config_gram.y"
                  {
    yyval = yyvsp[0];
  }
#line 1896 "config_gram.c"
    break;

  case 10: /* def: K_DEFAULT_PROGRAMMER TKN_EQUAL TKN_STRING TKN_SEMI  */
#line 236 "../avrdude-6.3/config_gram.y"
                                                     {
    strncpy(default_programmer, yyvsp[-1]->value.string, MAX_STR_CONST);
    default_programmer[MAX_STR_CONST-1] = 0;
    free_token(yyvsp[-1]);
  }
#line 1906 "config_gram.c"
    break;

  case 11: /* def: K_DEFAULT_PARALLEL TKN_EQUAL TKN_STRING TKN_SEMI  */
#line 242 "../avrdude-6.3/config_gram.y"
                                                   {
    strncpy(default_parallel, yyvsp[-1]->value.string, PATH_MAX);
    default_parallel[PATH_MAX-1] = 0;
    free_token(yyvsp[-1]);
  }
#line 1916 "config_gram.c"
    break;

  case 12: /* def: K_DEFAULT_SERIAL TKN_EQUAL TKN_STRING TKN_SEMI  */
#line 248 "../avrdude-6.3/config_gram.y"
                                                 {
    strncpy(default_serial, yyvsp[-1]->value.string, PATH_MAX);
    default_serial[PATH_MAX-1] = 0;
    free_token(yyvsp[-1]);
  }
#line 1926 "config_gram.c"
    break;

  case 13: /* def: K_DEFAULT_BITCLOCK TKN_EQUAL number_real TKN_SEMI  */
#line 254 "../avrdude-6.3/config_gram.y"
                                                    {
    default_bitclock = yyvsp[-1]->value.number_real;
    free_token(yyvsp[-1]);
  }
#line 1935 "config_gram.c"
    break;

  case 14: /* def: K_DEFAULT_SAFEMODE TKN_EQUAL yesno TKN_SEMI  */
#line 259 "../avrdude-6.3/config_gram.y"
                                              {
    if (yyvsp[-1]->primary == K_YES)
      default_safemode = 1;
    else if (yyvsp[-1]->primary == K_NO)
      default_safemode = 0;
    free_token(yyvsp[-1]);
  }
#line 1947 "config_gram.c"
    break;

  case 15: /* prog_def: prog_decl prog_parms  */
#line 271 "../avrdude-6.3/config_gram.y"
    {
      PROGRAMMER * existing_prog;
      char * id;
      if (lsize(current_prog->id) == 0) {
        yyerror("required parameter id not specified");
        YYABORT;
      }
      if (current_prog->initpgm == NULL) {
        yyerror("programmer type not specified");
        YYABORT;
      }
      id = ldata(lfirst(current_prog->id));
      existing_prog = locate_programmer(programmers, id);
      if (existing_prog) {
        { /* temporarly set lineno to lineno of programmer start */
          int temp = lineno; lineno = current_prog->lineno;
          yywarning("programmer %s overwrites previous definition %s:%d.",
                id, existing_prog->config_file, existing_prog->lineno);
          lineno = temp;
        }
        lrmv_d(programmers, existing_prog);
        pgm_free(existing_prog);
      }
      PUSH(programmers, current_prog);
//      pgm_fill_old_pins(current_prog); // TODO to be removed if old pin data no longer needed
//      pgm_display_generic(current_prog, id);
      current_prog = NULL;
    }
#line 1980 "config_gram.c"
    break;

  case 16: /* prog_decl: K_PROGRAMMER  */
#line 304 "../avrdude-6.3/config_gram.y"
    { current_prog = pgm_new();
      if (current_prog == NULL) {
        yyerror("could not create pgm instance");
        YYABORT;
      }
      strcpy(current_prog->config_file, infile);
      current_prog->lineno = lineno;
    }
#line 1993 "config_gram.c"
    break;

  case 17: /* prog_decl: K_PROGRAMMER K_PARENT TKN_STRING  */
#line 314 "../avrdude-6.3/config_gram.y"
    {
      struct programmer_t * pgm = locate_programmer(programmers, yyvsp[0]->value.string);
      if (pgm == NULL) {
        yyerror("parent programmer %s not found", yyvsp[0]->value.string);
        free_token(yyvsp[0]);
        YYABORT;
      }
      current_prog = pgm_dup(pgm);
      if (current_prog == NULL) {
        yyerror("could not duplicate pgm instance");
        free_token(yyvsp[0]);
        YYABORT;
      }
      strcpy(current_prog->config_file, infile);
      current_prog->lineno = lineno;
      free_token(yyvsp[0]);
    }
#line 2015 "config_gram.c"
    break;

  case 18: /* part_def: part_decl part_parms  */
#line 336 "../avrdude-6.3/config_gram.y"
    { 
      LNODEID ln;
      AVRMEM * m;
      AVRPART * existing_part;

      if (current_part->id[0] == 0) {
        yyerror("required parameter id not specified");
        YYABORT;
      }

      /*
       * perform some sanity checking, and compute the number of bits
       * to shift a page for constructing the page address for
       * page-addressed memories.
       */
      for (ln=lfirst(current_part->mem); ln; ln=lnext(ln)) {
        m = ldata(ln);
        if (m->paged) {
          if (m->page_size == 0) {
            yyerror("must specify page_size for paged memory");
            YYABORT;
          }
          if (m->num_pages == 0) {
            yyerror("must specify num_pages for paged memory");
            YYABORT;
          }
          if (m->size != m->page_size * m->num_pages) {
            yyerror("page size (%u) * num_pages (%u) = "
                    "%u does not match memory size (%u)",
                    m->page_size,
                    m->num_pages,
                    m->page_size * m->num_pages,
                    m->size);
            YYABORT;
          }

        }
      }

      existing_part = locate_part(part_list, current_part->id);
      if (existing_part) {
        { /* temporarly set lineno to lineno of part start */
          int temp = lineno; lineno = current_part->lineno;
          yywarning("part %s overwrites previous definition %s:%d.",
                current_part->id,
                existing_part->config_file, existing_part->lineno);
          lineno = temp;
        }
        lrmv_d(part_list, existing_part);
        avr_free_part(existing_part);
      }
      PUSH(part_list, current_part); 
      current_part = NULL; 
    }
#line 2074 "config_gram.c"
    break;

  case 19: /* part_decl: K_PART  */
#line 394 "../avrdude-6.3/config_gram.y"
    {
      current_part = avr_new_part();
      if (current_part == NULL) {
        yyerror("could not create part instance");
        YYABORT;
      }
      strcpy(current_part->config_file, infile);
      current_part->lineno = lineno;
    }
#line 2088 "config_gram.c"
    break;

  case 20: /* part_decl: K_PART K_PARENT TKN_STRING  */
#line 404 "../avrdude-6.3/config_gram.y"
    {
      AVRPART * parent_part = locate_part(part_list, yyvsp[0]->value.string);
      if (parent_part == NULL) {
        yyerror("can't find parent part");
        free_token(yyvsp[0]);
        YYABORT;
      }

      current_part = avr_dup_part(parent_part);
      if (current_part == NULL) {
        yyerror("could not duplicate part instance");
        free_token(yyvsp[0]);
        YYABORT;
      }
      strcpy(current_part->config_file, infile);
      current_part->lineno = lineno;

      free_token(yyvsp[0]);
    }
#line 2112 "config_gram.c"
    break;

  case 21: /* string_list: TKN_STRING  */
#line 426 "../avrdude-6.3/config_gram.y"
             { ladd(string_list, yyvsp[0]); }
#line 2118 "config_gram.c"
    break;

  case 22: /* string_list: string_list TKN_COMMA TKN_STRING  */
#line 427 "../avrdude-6.3/config_gram.y"
                                   { ladd(string_list, yyvsp[0]); }
#line 2124 "config_gram.c"
    break;

  case 23: /* num_list: TKN_NUMBER  */
#line 432 "../avrdude-6.3/config_gram.y"
             { ladd(number_list, yyvsp[0]); }
#line 2130 "config_gram.c"
    break;

  case 24: /* num_list: num_list TKN_COMMA TKN_NUMBER  */
#line 433 "../avrdude-6.3/config_gram.y"
                                { ladd(number_list, yyvsp[0]); }
#line 2136 "config_gram.c"
    break;

  case 27: /* prog_parm: K_ID TKN_EQUAL string_list  */
#line 442 "../avrdude-6.3/config_gram.y"
                             {
    {
      TOKEN * t;
      char *s;
      int do_yyabort = 0;
      while (lsize(string_list)) {
        t = lrmv_n(string_list, 1);
        if (!do_yyabort) {
          s = dup_string(t->value.string);
          if (s == NULL) {
            do_yyabort = 1;
          } else {
            ladd(current_prog->id, s);
          }
        }
        /* if do_yyabort == 1 just make the list empty */
        free_token(t);
      }
      if (do_yyabort) {
        YYABORT;
      }
    }
  }
#line 2164 "config_gram.c"
    break;

  case 32: /* prog_parm: K_DESC TKN_EQUAL TKN_STRING  */
#line 473 "../avrdude-6.3/config_gram.y"
                              {
    strncpy(current_prog->desc, yyvsp[0]->value.string, PGM_DESCLEN);
    current_prog->desc[PGM_DESCLEN-1] = 0;
    free_token(yyvsp[0]);
  }
#line 2174 "config_gram.c"
    break;

  case 33: /* prog_parm: K_BAUDRATE TKN_EQUAL TKN_NUMBER  */
#line 478 "../avrdude-6.3/config_gram.y"
                                  {
    {
      current_prog->baudrate = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
  }
#line 2185 "config_gram.c"
    break;

  case 35: /* prog_parm_type_id: TKN_STRING  */
#line 491 "../avrdude-6.3/config_gram.y"
                    {
  const struct programmer_type_t * pgm_type = locate_programmer_type(yyvsp[0]->value.string);
    if (pgm_type == NULL) {
        yyerror("programmer type %s not found", yyvsp[0]->value.string);
        free_token(yyvsp[0]); 
        YYABORT;
    }
    current_prog->initpgm = pgm_type->initpgm;
    free_token(yyvsp[0]); 
}
#line 2200 "config_gram.c"
    break;

  case 36: /* prog_parm_type_id: error  */
#line 502 "../avrdude-6.3/config_gram.y"
{
        yyerror("programmer type must be written as \"id_type\"");
        YYABORT;
}
#line 2209 "config_gram.c"
    break;

  case 38: /* prog_parm_conntype_id: K_PARALLEL  */
#line 513 "../avrdude-6.3/config_gram.y"
                    { current_prog->conntype = CONNTYPE_PARALLEL; }
#line 2215 "config_gram.c"
    break;

  case 39: /* prog_parm_conntype_id: K_SERIAL  */
#line 514 "../avrdude-6.3/config_gram.y"
                    { current_prog->conntype = CONNTYPE_SERIAL; }
#line 2221 "config_gram.c"
    break;

  case 40: /* prog_parm_conntype_id: K_USB  */
#line 515 "../avrdude-6.3/config_gram.y"
                    { current_prog->conntype = CONNTYPE_USB; }
#line 2227 "config_gram.c"
    break;

  case 41: /* prog_parm_usb: K_USBDEV TKN_EQUAL TKN_STRING  */
#line 519 "../avrdude-6.3/config_gram.y"
                                {
    {
      strncpy(current_prog->usbdev, yyvsp[0]->value.string, PGM_USBSTRINGLEN);
      current_prog->usbdev[PGM_USBSTRINGLEN-1] = 0;
      free_token(yyvsp[0]);
    }
  }
#line 2239 "config_gram.c"
    break;

  case 42: /* prog_parm_usb: K_USBVID TKN_EQUAL TKN_NUMBER  */
#line 526 "../avrdude-6.3/config_gram.y"
                                {
    {
      current_prog->usbvid = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
  }
#line 2250 "config_gram.c"
    break;

  case 44: /* prog_parm_usb: K_USBSN TKN_EQUAL TKN_STRING  */
#line 533 "../avrdude-6.3/config_gram.y"
                               {
    {
      strncpy(current_prog->usbsn, yyvsp[0]->value.string, PGM_USBSTRINGLEN);
      current_prog->usbsn[PGM_USBSTRINGLEN-1] = 0;
      free_token(yyvsp[0]);
    }
  }
#line 2262 "config_gram.c"
    break;

  case 45: /* prog_parm_usb: K_USBVENDOR TKN_EQUAL TKN_STRING  */
#line 540 "../avrdude-6.3/config_gram.y"
                                   {
    {
      strncpy(current_prog->usbvendor, yyvsp[0]->value.string, PGM_USBSTRINGLEN);
      current_prog->usbvendor[PGM_USBSTRINGLEN-1] = 0;
      free_token(yyvsp[0]);
    }
  }
#line 2274 "config_gram.c"
    break;

  case 46: /* prog_parm_usb: K_USBPRODUCT TKN_EQUAL TKN_STRING  */
#line 547 "../avrdude-6.3/config_gram.y"
                                    {
    {
      strncpy(current_prog->usbproduct, yyvsp[0]->value.string, PGM_USBSTRINGLEN);
      current_prog->usbproduct[PGM_USBSTRINGLEN-1] = 0;
      free_token(yyvsp[0]);
    }
  }
#line 2286 "config_gram.c"
    break;

  case 47: /* usb_pid_list: TKN_NUMBER  */
#line 557 "../avrdude-6.3/config_gram.y"
             {
    {
      /* overwrite pids, so clear the existing entries */
      ldestroy_cb(current_prog->usbpid, free);
      current_prog->usbpid = lcreat(NULL, 0);
    }
    {
      int *ip = malloc(sizeof(int));
      if (ip) {
        *ip = yyvsp[0]->value.number;
        ladd(current_prog->usbpid, ip);
      }
      free_token(yyvsp[0]);
    }
  }
#line 2306 "config_gram.c"
    break;

  case 48: /* usb_pid_list: usb_pid_list TKN_COMMA TKN_NUMBER  */
#line 572 "../avrdude-6.3/config_gram.y"
                                    {
    {
      int *ip = malloc(sizeof(int));
      if (ip) {
        *ip = yyvsp[0]->value.number;
        ladd(current_prog->usbpid, ip);
      }
      free_token(yyvsp[0]);
    }
  }
#line 2321 "config_gram.c"
    break;

  case 49: /* pin_number_non_empty: TKN_NUMBER  */
#line 585 "../avrdude-6.3/config_gram.y"
             { if(0 != assign_pin(pin_name, yyvsp[0], 0)) YYABORT;  }
#line 2327 "config_gram.c"
    break;

  case 50: /* pin_number_non_empty: TKN_TILDE TKN_NUMBER  */
#line 587 "../avrdude-6.3/config_gram.y"
                       { if(0 != assign_pin(pin_name, yyvsp[0], 1)) YYABORT; }
#line 2333 "config_gram.c"
    break;

  case 52: /* pin_number: %empty  */
#line 593 "../avrdude-6.3/config_gram.y"
              { pin_clear_all(&(current_prog->pin[pin_name])); }
#line 2339 "config_gram.c"
    break;

  case 54: /* pin_list_element: TKN_TILDE TKN_LEFT_PAREN num_list TKN_RIGHT_PAREN  */
#line 599 "../avrdude-6.3/config_gram.y"
                                                    { if(0 != assign_pin_list(1)) YYABORT; }
#line 2345 "config_gram.c"
    break;

  case 58: /* pin_list: %empty  */
#line 612 "../avrdude-6.3/config_gram.y"
              { pin_clear_all(&(current_prog->pin[pin_name])); }
#line 2351 "config_gram.c"
    break;

  case 59: /* $@1: %empty  */
#line 616 "../avrdude-6.3/config_gram.y"
                     {pin_name = PPI_AVR_VCC;  }
#line 2357 "config_gram.c"
    break;

  case 61: /* $@2: %empty  */
#line 617 "../avrdude-6.3/config_gram.y"
                     {pin_name = PPI_AVR_BUFF; }
#line 2363 "config_gram.c"
    break;

  case 63: /* $@3: %empty  */
#line 618 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_AVR_RESET;}
#line 2369 "config_gram.c"
    break;

  case 64: /* prog_parm_pins: K_RESET TKN_EQUAL $@3 pin_number  */
#line 618 "../avrdude-6.3/config_gram.y"
                                                            { free_token(yyvsp[-3]); }
#line 2375 "config_gram.c"
    break;

  case 65: /* $@4: %empty  */
#line 619 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_AVR_SCK;  }
#line 2381 "config_gram.c"
    break;

  case 66: /* prog_parm_pins: K_SCK TKN_EQUAL $@4 pin_number  */
#line 619 "../avrdude-6.3/config_gram.y"
                                                            { free_token(yyvsp[-3]); }
#line 2387 "config_gram.c"
    break;

  case 67: /* $@5: %empty  */
#line 620 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_AVR_MOSI; }
#line 2393 "config_gram.c"
    break;

  case 69: /* $@6: %empty  */
#line 621 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_AVR_MISO; }
#line 2399 "config_gram.c"
    break;

  case 71: /* $@7: %empty  */
#line 622 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_LED_ERR;  }
#line 2405 "config_gram.c"
    break;

  case 73: /* $@8: %empty  */
#line 623 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_LED_RDY;  }
#line 2411 "config_gram.c"
    break;

  case 75: /* $@9: %empty  */
#line 624 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_LED_PGM;  }
#line 2417 "config_gram.c"
    break;

  case 77: /* $@10: %empty  */
#line 625 "../avrdude-6.3/config_gram.y"
                     {pin_name = PIN_LED_VFY;  }
#line 2423 "config_gram.c"
    break;

  case 99: /* part_parm: K_ID TKN_EQUAL TKN_STRING  */
#line 664 "../avrdude-6.3/config_gram.y"
    {
      strncpy(current_part->id, yyvsp[0]->value.string, AVR_IDLEN);
      current_part->id[AVR_IDLEN-1] = 0;
      free_token(yyvsp[0]);
    }
#line 2433 "config_gram.c"
    break;

  case 100: /* part_parm: K_DESC TKN_EQUAL TKN_STRING  */
#line 671 "../avrdude-6.3/config_gram.y"
    {
      strncpy(current_part->desc, yyvsp[0]->value.string, AVR_DESCLEN);
      current_part->desc[AVR_DESCLEN-1] = 0;
      free_token(yyvsp[0]);
    }
#line 2443 "config_gram.c"
    break;

  case 101: /* part_parm: K_DEVICECODE TKN_EQUAL TKN_NUMBER  */
#line 677 "../avrdude-6.3/config_gram.y"
                                    {
    {
      yyerror("devicecode is deprecated, use "
              "stk500_devcode instead");
      YYABORT;
    }
  }
#line 2455 "config_gram.c"
    break;

  case 102: /* part_parm: K_STK500_DEVCODE TKN_EQUAL TKN_NUMBER  */
#line 685 "../avrdude-6.3/config_gram.y"
                                        {
    {
      current_part->stk500_devcode = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
  }
#line 2466 "config_gram.c"
    break;

  case 103: /* part_parm: K_AVR910_DEVCODE TKN_EQUAL TKN_NUMBER  */
#line 692 "../avrdude-6.3/config_gram.y"
                                        {
    {
      current_part->avr910_devcode = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
  }
#line 2477 "config_gram.c"
    break;

  case 104: /* part_parm: K_SIGNATURE TKN_EQUAL TKN_NUMBER TKN_NUMBER TKN_NUMBER  */
#line 699 "../avrdude-6.3/config_gram.y"
                                                         {
    {
      current_part->signature[0] = yyvsp[-2]->value.number;
      current_part->signature[1] = yyvsp[-1]->value.number;
      current_part->signature[2] = yyvsp[0]->value.number;
      free_token(yyvsp[-2]);
      free_token(yyvsp[-1]);
      free_token(yyvsp[0]);
    }
  }
#line 2492 "config_gram.c"
    break;

  case 105: /* part_parm: K_USBPID TKN_EQUAL TKN_NUMBER  */
#line 710 "../avrdude-6.3/config_gram.y"
                               {
    {
      current_part->usbpid = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
  }
#line 2503 "config_gram.c"
    break;

  case 106: /* part_parm: K_PP_CONTROLSTACK TKN_EQUAL num_list  */
#line 717 "../avrdude-6.3/config_gram.y"
                                       {
    {
      TOKEN * t;
      unsigned nbytes;
      int ok;

      current_part->ctl_stack_type = CTL_STACK_PP;
      nbytes = 0;
      ok = 1;

      memset(current_part->controlstack, 0, CTL_STACK_SIZE);
      while (lsize(number_list)) {
        t = lrmv_n(number_list, 1);
	if (nbytes < CTL_STACK_SIZE)
	  {
	    current_part->controlstack[nbytes] = t->value.number;
	    nbytes++;
	  }
	else
	  {
	    ok = 0;
	  }
        free_token(t);
      }
      if (!ok)
	{
	  yywarning("too many bytes in control stack");
        }
    }
  }
#line 2538 "config_gram.c"
    break;

  case 107: /* part_parm: K_HVSP_CONTROLSTACK TKN_EQUAL num_list  */
#line 748 "../avrdude-6.3/config_gram.y"
                                         {
    {
      TOKEN * t;
      unsigned nbytes;
      int ok;

      current_part->ctl_stack_type = CTL_STACK_HVSP;
      nbytes = 0;
      ok = 1;

      memset(current_part->controlstack, 0, CTL_STACK_SIZE);
      while (lsize(number_list)) {
        t = lrmv_n(number_list, 1);
	if (nbytes < CTL_STACK_SIZE)
	  {
	    current_part->controlstack[nbytes] = t->value.number;
	    nbytes++;
	  }
	else
	  {
	    ok = 0;
	  }
        free_token(t);
      }
      if (!ok)
	{
	  yywarning("too many bytes in control stack");
        }
    }
  }
#line 2573 "config_gram.c"
    break;

  case 108: /* part_parm: K_FLASH_INSTR TKN_EQUAL num_list  */
#line 779 "../avrdude-6.3/config_gram.y"
                                   {
    {
      TOKEN * t;
      unsigned nbytes;
      int ok;

      nbytes = 0;
      ok = 1;

      memset(current_part->flash_instr, 0, FLASH_INSTR_SIZE);
      while (lsize(number_list)) {
        t = lrmv_n(number_list, 1);
	if (nbytes < FLASH_INSTR_SIZE)
	  {
	    current_part->flash_instr[nbytes] = t->value.number;
	    nbytes++;
	  }
	else
	  {
	    ok = 0;
	  }
        free_token(t);
      }
      if (!ok)
	{
	  yywarning("too many bytes in flash instructions");
        }
    }
  }
#line 2607 "config_gram.c"
    break;

  case 109: /* part_parm: K_EEPROM_INSTR TKN_EQUAL num_list  */
#line 809 "../avrdude-6.3/config_gram.y"
                                    {
    {
      TOKEN * t;
      unsigned nbytes;
      int ok;

      nbytes = 0;
      ok = 1;

      memset(current_part->eeprom_instr, 0, EEPROM_INSTR_SIZE);
      while (lsize(number_list)) {
        t = lrmv_n(number_list, 1);
	if (nbytes < EEPROM_INSTR_SIZE)
	  {
	    current_part->eeprom_instr[nbytes] = t->value.number;
	    nbytes++;
	  }
	else
	  {
	    ok = 0;
	  }
        free_token(t);
      }
      if (!ok)
	{
	  yywarning("too many bytes in EEPROM instructions");
        }
    }
  }
#line 2641 "config_gram.c"
    break;

  case 110: /* part_parm: K_CHIP_ERASE_DELAY TKN_EQUAL TKN_NUMBER  */
#line 840 "../avrdude-6.3/config_gram.y"
    {
      current_part->chip_erase_delay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2650 "config_gram.c"
    break;

  case 111: /* part_parm: K_PAGEL TKN_EQUAL TKN_NUMBER  */
#line 846 "../avrdude-6.3/config_gram.y"
    {
      current_part->pagel = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2659 "config_gram.c"
    break;

  case 112: /* part_parm: K_BS2 TKN_EQUAL TKN_NUMBER  */
#line 852 "../avrdude-6.3/config_gram.y"
    {
      current_part->bs2 = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2668 "config_gram.c"
    break;

  case 113: /* part_parm: K_RESET TKN_EQUAL reset_disposition  */
#line 858 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_DEDICATED)
        current_part->reset_disposition = RESET_DEDICATED;
      else if (yyvsp[0]->primary == K_IO)
        current_part->reset_disposition = RESET_IO;

      free_tokens(2, yyvsp[-2], yyvsp[0]);
    }
#line 2681 "config_gram.c"
    break;

  case 114: /* part_parm: K_TIMEOUT TKN_EQUAL TKN_NUMBER  */
#line 868 "../avrdude-6.3/config_gram.y"
    {
      current_part->timeout = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2690 "config_gram.c"
    break;

  case 115: /* part_parm: K_STABDELAY TKN_EQUAL TKN_NUMBER  */
#line 874 "../avrdude-6.3/config_gram.y"
    {
      current_part->stabdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2699 "config_gram.c"
    break;

  case 116: /* part_parm: K_CMDEXEDELAY TKN_EQUAL TKN_NUMBER  */
#line 880 "../avrdude-6.3/config_gram.y"
    {
      current_part->cmdexedelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2708 "config_gram.c"
    break;

  case 117: /* part_parm: K_HVSPCMDEXEDELAY TKN_EQUAL TKN_NUMBER  */
#line 886 "../avrdude-6.3/config_gram.y"
    {
      current_part->hvspcmdexedelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2717 "config_gram.c"
    break;

  case 118: /* part_parm: K_SYNCHLOOPS TKN_EQUAL TKN_NUMBER  */
#line 892 "../avrdude-6.3/config_gram.y"
    {
      current_part->synchloops = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2726 "config_gram.c"
    break;

  case 119: /* part_parm: K_BYTEDELAY TKN_EQUAL TKN_NUMBER  */
#line 898 "../avrdude-6.3/config_gram.y"
    {
      current_part->bytedelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2735 "config_gram.c"
    break;

  case 120: /* part_parm: K_POLLVALUE TKN_EQUAL TKN_NUMBER  */
#line 904 "../avrdude-6.3/config_gram.y"
    {
      current_part->pollvalue = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2744 "config_gram.c"
    break;

  case 121: /* part_parm: K_POLLINDEX TKN_EQUAL TKN_NUMBER  */
#line 910 "../avrdude-6.3/config_gram.y"
    {
      current_part->pollindex = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2753 "config_gram.c"
    break;

  case 122: /* part_parm: K_PREDELAY TKN_EQUAL TKN_NUMBER  */
#line 916 "../avrdude-6.3/config_gram.y"
    {
      current_part->predelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2762 "config_gram.c"
    break;

  case 123: /* part_parm: K_POSTDELAY TKN_EQUAL TKN_NUMBER  */
#line 922 "../avrdude-6.3/config_gram.y"
    {
      current_part->postdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2771 "config_gram.c"
    break;

  case 124: /* part_parm: K_POLLMETHOD TKN_EQUAL TKN_NUMBER  */
#line 928 "../avrdude-6.3/config_gram.y"
    {
      current_part->pollmethod = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2780 "config_gram.c"
    break;

  case 125: /* part_parm: K_HVENTERSTABDELAY TKN_EQUAL TKN_NUMBER  */
#line 934 "../avrdude-6.3/config_gram.y"
    {
      current_part->hventerstabdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2789 "config_gram.c"
    break;

  case 126: /* part_parm: K_PROGMODEDELAY TKN_EQUAL TKN_NUMBER  */
#line 940 "../avrdude-6.3/config_gram.y"
    {
      current_part->progmodedelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2798 "config_gram.c"
    break;

  case 127: /* part_parm: K_LATCHCYCLES TKN_EQUAL TKN_NUMBER  */
#line 946 "../avrdude-6.3/config_gram.y"
    {
      current_part->latchcycles = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2807 "config_gram.c"
    break;

  case 128: /* part_parm: K_TOGGLEVTG TKN_EQUAL TKN_NUMBER  */
#line 952 "../avrdude-6.3/config_gram.y"
    {
      current_part->togglevtg = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2816 "config_gram.c"
    break;

  case 129: /* part_parm: K_POWEROFFDELAY TKN_EQUAL TKN_NUMBER  */
#line 958 "../avrdude-6.3/config_gram.y"
    {
      current_part->poweroffdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2825 "config_gram.c"
    break;

  case 130: /* part_parm: K_RESETDELAYMS TKN_EQUAL TKN_NUMBER  */
#line 964 "../avrdude-6.3/config_gram.y"
    {
      current_part->resetdelayms = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2834 "config_gram.c"
    break;

  case 131: /* part_parm: K_RESETDELAYUS TKN_EQUAL TKN_NUMBER  */
#line 970 "../avrdude-6.3/config_gram.y"
    {
      current_part->resetdelayus = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2843 "config_gram.c"
    break;

  case 132: /* part_parm: K_HVLEAVESTABDELAY TKN_EQUAL TKN_NUMBER  */
#line 976 "../avrdude-6.3/config_gram.y"
    {
      current_part->hvleavestabdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2852 "config_gram.c"
    break;

  case 133: /* part_parm: K_RESETDELAY TKN_EQUAL TKN_NUMBER  */
#line 982 "../avrdude-6.3/config_gram.y"
    {
      current_part->resetdelay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2861 "config_gram.c"
    break;

  case 134: /* part_parm: K_CHIPERASEPULSEWIDTH TKN_EQUAL TKN_NUMBER  */
#line 988 "../avrdude-6.3/config_gram.y"
    {
      current_part->chiperasepulsewidth = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2870 "config_gram.c"
    break;

  case 135: /* part_parm: K_CHIPERASEPOLLTIMEOUT TKN_EQUAL TKN_NUMBER  */
#line 994 "../avrdude-6.3/config_gram.y"
    {
      current_part->chiperasepolltimeout = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2879 "config_gram.c"
    break;

  case 136: /* part_parm: K_CHIPERASETIME TKN_EQUAL TKN_NUMBER  */
#line 1000 "../avrdude-6.3/config_gram.y"
    {
      current_part->chiperasetime = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2888 "config_gram.c"
    break;

  case 137: /* part_parm: K_PROGRAMFUSEPULSEWIDTH TKN_EQUAL TKN_NUMBER  */
#line 1006 "../avrdude-6.3/config_gram.y"
    {
      current_part->programfusepulsewidth = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2897 "config_gram.c"
    break;

  case 138: /* part_parm: K_PROGRAMFUSEPOLLTIMEOUT TKN_EQUAL TKN_NUMBER  */
#line 1012 "../avrdude-6.3/config_gram.y"
    {
      current_part->programfusepolltimeout = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2906 "config_gram.c"
    break;

  case 139: /* part_parm: K_PROGRAMLOCKPULSEWIDTH TKN_EQUAL TKN_NUMBER  */
#line 1018 "../avrdude-6.3/config_gram.y"
    {
      current_part->programlockpulsewidth = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2915 "config_gram.c"
    break;

  case 140: /* part_parm: K_PROGRAMLOCKPOLLTIMEOUT TKN_EQUAL TKN_NUMBER  */
#line 1024 "../avrdude-6.3/config_gram.y"
    {
      current_part->programlockpolltimeout = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2924 "config_gram.c"
    break;

  case 141: /* part_parm: K_SYNCHCYCLES TKN_EQUAL TKN_NUMBER  */
#line 1030 "../avrdude-6.3/config_gram.y"
    {
      current_part->synchcycles = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 2933 "config_gram.c"
    break;

  case 142: /* part_parm: K_HAS_JTAG TKN_EQUAL yesno  */
#line 1036 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_HAS_JTAG;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_HAS_JTAG;

      free_token(yyvsp[0]);
    }
#line 2946 "config_gram.c"
    break;

  case 143: /* part_parm: K_HAS_DW TKN_EQUAL yesno  */
#line 1046 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_HAS_DW;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_HAS_DW;

      free_token(yyvsp[0]);
    }
#line 2959 "config_gram.c"
    break;

  case 144: /* part_parm: K_HAS_PDI TKN_EQUAL yesno  */
#line 1056 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_HAS_PDI;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_HAS_PDI;

      free_token(yyvsp[0]);
    }
#line 2972 "config_gram.c"
    break;

  case 145: /* part_parm: K_HAS_TPI TKN_EQUAL yesno  */
#line 1066 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_HAS_TPI;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_HAS_TPI;

      free_token(yyvsp[0]);
    }
#line 2985 "config_gram.c"
    break;

  case 146: /* part_parm: K_IS_AT90S1200 TKN_EQUAL yesno  */
#line 1076 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_IS_AT90S1200;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_IS_AT90S1200;

      free_token(yyvsp[0]);
    }
#line 2998 "config_gram.c"
    break;

  case 147: /* part_parm: K_IS_AVR32 TKN_EQUAL yesno  */
#line 1086 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_AVR32;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_AVR32;

      free_token(yyvsp[0]);
    }
#line 3011 "config_gram.c"
    break;

  case 148: /* part_parm: K_ALLOWFULLPAGEBITSTREAM TKN_EQUAL yesno  */
#line 1096 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_ALLOWFULLPAGEBITSTREAM;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_ALLOWFULLPAGEBITSTREAM;

      free_token(yyvsp[0]);
    }
#line 3024 "config_gram.c"
    break;

  case 149: /* part_parm: K_ENABLEPAGEPROGRAMMING TKN_EQUAL yesno  */
#line 1106 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_ENABLEPAGEPROGRAMMING;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_ENABLEPAGEPROGRAMMING;

      free_token(yyvsp[0]);
    }
#line 3037 "config_gram.c"
    break;

  case 150: /* part_parm: K_IDR TKN_EQUAL TKN_NUMBER  */
#line 1116 "../avrdude-6.3/config_gram.y"
    {
      current_part->idr = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3046 "config_gram.c"
    break;

  case 151: /* part_parm: K_RAMPZ TKN_EQUAL TKN_NUMBER  */
#line 1122 "../avrdude-6.3/config_gram.y"
    {
      current_part->rampz = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3055 "config_gram.c"
    break;

  case 152: /* part_parm: K_SPMCR TKN_EQUAL TKN_NUMBER  */
#line 1128 "../avrdude-6.3/config_gram.y"
    {
      current_part->spmcr = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3064 "config_gram.c"
    break;

  case 153: /* part_parm: K_EECR TKN_EQUAL TKN_NUMBER  */
#line 1134 "../avrdude-6.3/config_gram.y"
    {
      current_part->eecr = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3073 "config_gram.c"
    break;

  case 154: /* part_parm: K_MCU_BASE TKN_EQUAL TKN_NUMBER  */
#line 1140 "../avrdude-6.3/config_gram.y"
    {
      current_part->mcu_base = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3082 "config_gram.c"
    break;

  case 155: /* part_parm: K_NVM_BASE TKN_EQUAL TKN_NUMBER  */
#line 1146 "../avrdude-6.3/config_gram.y"
    {
      current_part->nvm_base = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3091 "config_gram.c"
    break;

  case 156: /* part_parm: K_OCDREV TKN_EQUAL TKN_NUMBER  */
#line 1152 "../avrdude-6.3/config_gram.y"
    {
      current_part->ocdrev = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3100 "config_gram.c"
    break;

  case 157: /* part_parm: K_SERIAL TKN_EQUAL yesno  */
#line 1158 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES)
        current_part->flags |= AVRPART_SERIALOK;
      else if (yyvsp[0]->primary == K_NO)
        current_part->flags &= ~AVRPART_SERIALOK;

      free_token(yyvsp[0]);
    }
#line 3113 "config_gram.c"
    break;

  case 158: /* part_parm: K_PARALLEL TKN_EQUAL parallel_modes  */
#line 1168 "../avrdude-6.3/config_gram.y"
    {
      if (yyvsp[0]->primary == K_YES) {
        current_part->flags |= AVRPART_PARALLELOK;
        current_part->flags &= ~AVRPART_PSEUDOPARALLEL;
      }
      else if (yyvsp[0]->primary == K_NO) {
        current_part->flags &= ~AVRPART_PARALLELOK;
        current_part->flags &= ~AVRPART_PSEUDOPARALLEL;
      }
      else if (yyvsp[0]->primary == K_PSEUDO) {
        current_part->flags |= AVRPART_PARALLELOK;
        current_part->flags |= AVRPART_PSEUDOPARALLEL;
      }


      free_token(yyvsp[0]);
    }
#line 3135 "config_gram.c"
    break;

  case 159: /* part_parm: K_RETRY_PULSE TKN_EQUAL retry_lines  */
#line 1187 "../avrdude-6.3/config_gram.y"
    {
      switch (yyvsp[0]->primary) {
        case K_RESET :
          current_part->retry_pulse = PIN_AVR_RESET;
          break;
        case K_SCK :
          current_part->retry_pulse = PIN_AVR_SCK;
          break;
      }

      free_token(yyvsp[-2]);
    }
#line 3152 "config_gram.c"
    break;

  case 160: /* $@11: %empty  */
#line 1210 "../avrdude-6.3/config_gram.y"
    {
      current_mem = avr_new_memtype();
      if (current_mem == NULL) {
        yyerror("could not create mem instance");
        free_token(yyvsp[0]);
        YYABORT;
      }
      strncpy(current_mem->desc, yyvsp[0]->value.string, AVR_MEMDESCLEN);
      current_mem->desc[AVR_MEMDESCLEN-1] = 0;
      free_token(yyvsp[0]);
    }
#line 3168 "config_gram.c"
    break;

  case 161: /* part_parm: K_MEMORY TKN_STRING $@11 mem_specs  */
#line 1222 "../avrdude-6.3/config_gram.y"
    { 
      AVRMEM * existing_mem;

      existing_mem = avr_locate_mem(current_part, current_mem->desc);
      if (existing_mem != NULL) {
        lrmv_d(current_part->mem, existing_mem);
        avr_free_mem(existing_mem);
      }
      ladd(current_part->mem, current_mem); 
      current_mem = NULL; 
    }
#line 3184 "config_gram.c"
    break;

  case 162: /* part_parm: opcode TKN_EQUAL string_list  */
#line 1234 "../avrdude-6.3/config_gram.y"
                               {
    { 
      int opnum;
      OPCODE * op;

      opnum = which_opcode(yyvsp[-2]);
      if (opnum < 0) YYABORT;
      op = avr_new_opcode();
      if (op == NULL) {
        yyerror("could not create opcode instance");
        free_token(yyvsp[-2]);
        YYABORT;
      }
      if(0 != parse_cmdbits(op)) YYABORT;
      if (current_part->op[opnum] != NULL) {
        /*yywarning("operation redefined");*/
        avr_free_opcode(current_part->op[opnum]);
      }
      current_part->op[opnum] = op;

      free_token(yyvsp[-2]);
    }
  }
#line 3212 "config_gram.c"
    break;

  case 167: /* mem_spec: K_PAGED TKN_EQUAL yesno  */
#line 1273 "../avrdude-6.3/config_gram.y"
    {
      current_mem->paged = yyvsp[0]->primary == K_YES ? 1 : 0;
      free_token(yyvsp[0]);
    }
#line 3221 "config_gram.c"
    break;

  case 168: /* mem_spec: K_SIZE TKN_EQUAL TKN_NUMBER  */
#line 1279 "../avrdude-6.3/config_gram.y"
    {
      current_mem->size = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3230 "config_gram.c"
    break;

  case 169: /* mem_spec: K_PAGE_SIZE TKN_EQUAL TKN_NUMBER  */
#line 1286 "../avrdude-6.3/config_gram.y"
    {
      current_mem->page_size = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3239 "config_gram.c"
    break;

  case 170: /* mem_spec: K_NUM_PAGES TKN_EQUAL TKN_NUMBER  */
#line 1292 "../avrdude-6.3/config_gram.y"
    {
      current_mem->num_pages = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3248 "config_gram.c"
    break;

  case 171: /* mem_spec: K_OFFSET TKN_EQUAL TKN_NUMBER  */
#line 1298 "../avrdude-6.3/config_gram.y"
    {
      current_mem->offset = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3257 "config_gram.c"
    break;

  case 172: /* mem_spec: K_MIN_WRITE_DELAY TKN_EQUAL TKN_NUMBER  */
#line 1304 "../avrdude-6.3/config_gram.y"
    {
      current_mem->min_write_delay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3266 "config_gram.c"
    break;

  case 173: /* mem_spec: K_MAX_WRITE_DELAY TKN_EQUAL TKN_NUMBER  */
#line 1310 "../avrdude-6.3/config_gram.y"
    {
      current_mem->max_write_delay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3275 "config_gram.c"
    break;

  case 174: /* mem_spec: K_PWROFF_AFTER_WRITE TKN_EQUAL yesno  */
#line 1316 "../avrdude-6.3/config_gram.y"
    {
      current_mem->pwroff_after_write = yyvsp[0]->primary == K_YES ? 1 : 0;
      free_token(yyvsp[0]);
    }
#line 3284 "config_gram.c"
    break;

  case 175: /* mem_spec: K_READBACK_P1 TKN_EQUAL TKN_NUMBER  */
#line 1322 "../avrdude-6.3/config_gram.y"
    {
      current_mem->readback[0] = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3293 "config_gram.c"
    break;

  case 176: /* mem_spec: K_READBACK_P2 TKN_EQUAL TKN_NUMBER  */
#line 1328 "../avrdude-6.3/config_gram.y"
    {
      current_mem->readback[1] = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3302 "config_gram.c"
    break;

  case 177: /* mem_spec: K_MODE TKN_EQUAL TKN_NUMBER  */
#line 1335 "../avrdude-6.3/config_gram.y"
    {
      current_mem->mode = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3311 "config_gram.c"
    break;

  case 178: /* mem_spec: K_DELAY TKN_EQUAL TKN_NUMBER  */
#line 1341 "../avrdude-6.3/config_gram.y"
    {
      current_mem->delay = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3320 "config_gram.c"
    break;

  case 179: /* mem_spec: K_BLOCKSIZE TKN_EQUAL TKN_NUMBER  */
#line 1347 "../avrdude-6.3/config_gram.y"
    {
      current_mem->blocksize = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3329 "config_gram.c"
    break;

  case 180: /* mem_spec: K_READSIZE TKN_EQUAL TKN_NUMBER  */
#line 1353 "../avrdude-6.3/config_gram.y"
    {
      current_mem->readsize = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3338 "config_gram.c"
    break;

  case 181: /* mem_spec: K_POLLINDEX TKN_EQUAL TKN_NUMBER  */
#line 1359 "../avrdude-6.3/config_gram.y"
    {
      current_mem->pollindex = yyvsp[0]->value.number;
      free_token(yyvsp[0]);
    }
#line 3347 "config_gram.c"
    break;

  case 182: /* mem_spec: opcode TKN_EQUAL string_list  */
#line 1365 "../avrdude-6.3/config_gram.y"
                               {
    { 
      int opnum;
      OPCODE * op;

      opnum = which_opcode(yyvsp[-2]);
      if (opnum < 0) YYABORT;
      op = avr_new_opcode();
      if (op == NULL) {
        yyerror("could not create opcode instance");
        free_token(yyvsp[-2]);
        YYABORT;
      }
      if(0 != parse_cmdbits(op)) YYABORT;
      if (current_mem->op[opnum] != NULL) {
        /*yywarning("operation redefined");*/
        avr_free_opcode(current_mem->op[opnum]);
      }
      current_mem->op[opnum] = op;

      free_token(yyvsp[-2]);
    }
  }
#line 3375 "config_gram.c"
    break;


#line 3379 "config_gram.c"

      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++yyvsp = yyval;

  /* 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.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (YY_("syntax error"));
    }

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

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval);
          yychar = YYEMPTY;
        }
    }

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


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
  /* Pacify compilers when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturnlab;


/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturnlab;


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

#line 1391 "../avrdude-6.3/config_gram.y"


#if 0
static char * vtypestr(int type)
{
  switch (type) {
    case V_NUM : return "INTEGER";
    case V_NUM_REAL: return "REAL";
    case V_STR : return "STRING";
    default:
      return "<UNKNOWN>";
  }
}
#endif


static int assign_pin(int pinno, TOKEN * v, int invert)
{
  int value;

  value = v->value.number;
  free_token(v);

  if ((value < PIN_MIN) || (value > PIN_MAX)) {
    yyerror("pin must be in the range " TOSTRING(PIN_MIN) "-"  TOSTRING(PIN_MAX));
    return -1;
  }

  pin_set_value(&(current_prog->pin[pinno]), value, invert);

  return 0;
}

static int assign_pin_list(int invert)
{
  TOKEN * t;
  int pin;
  int rv = 0;

  current_prog->pinno[pin_name] = 0;
  while (lsize(number_list)) {
    t = lrmv_n(number_list, 1);
    if (rv == 0) {
      pin = t->value.number;
      if ((pin < PIN_MIN) || (pin > PIN_MAX)) {
        yyerror("pin must be in the range " TOSTRING(PIN_MIN) "-"  TOSTRING(PIN_MAX));
        rv = -1;
      /* loop clears list and frees tokens */
      }
      pin_set_value(&(current_prog->pin[pin_name]), pin, invert);
    }
    free_token(t);
  }
  return rv;
}

static int which_opcode(TOKEN * opcode)
{
  switch (opcode->primary) {
    case K_READ        : return AVR_OP_READ; break;
    case K_WRITE       : return AVR_OP_WRITE; break;
    case K_READ_LO     : return AVR_OP_READ_LO; break;
    case K_READ_HI     : return AVR_OP_READ_HI; break;
    case K_WRITE_LO    : return AVR_OP_WRITE_LO; break;
    case K_WRITE_HI    : return AVR_OP_WRITE_HI; break;
    case K_LOADPAGE_LO : return AVR_OP_LOADPAGE_LO; break;
    case K_LOADPAGE_HI : return AVR_OP_LOADPAGE_HI; break;
    case K_LOAD_EXT_ADDR : return AVR_OP_LOAD_EXT_ADDR; break;
    case K_WRITEPAGE   : return AVR_OP_WRITEPAGE; break;
    case K_CHIP_ERASE  : return AVR_OP_CHIP_ERASE; break;
    case K_PGM_ENABLE  : return AVR_OP_PGM_ENABLE; break;
    default :
      yyerror("invalid opcode");
      return -1;
      break;
  }
}


static int parse_cmdbits(OPCODE * op)
{
  TOKEN * t;
  int bitno;
  char ch;
  char * e;
  char * q;
  int len;
  char * s, *brkt = NULL;
  int rv = 0;

  bitno = 32;
  while (lsize(string_list)) {

    t = lrmv_n(string_list, 1);

    s = strtok_r(t->value.string, " ", &brkt);
    while (rv == 0 && s != NULL) {

      bitno--;
      if (bitno < 0) {
        yyerror("too many opcode bits for instruction");
        rv = -1;
        break;
      }

      len = strlen(s);

      if (len == 0) {
        yyerror("invalid bit specifier \"\"");
        rv = -1;
        break;
      }

      ch = s[0];

      if (len == 1) {
        switch (ch) {
          case '1':
            op->bit[bitno].type  = AVR_CMDBIT_VALUE;
            op->bit[bitno].value = 1;
            op->bit[bitno].bitno = bitno % 8;
            break;
          case '0':
            op->bit[bitno].type  = AVR_CMDBIT_VALUE;
            op->bit[bitno].value = 0;
            op->bit[bitno].bitno = bitno % 8;
            break;
          case 'x':
            op->bit[bitno].type  = AVR_CMDBIT_IGNORE;
            op->bit[bitno].value = 0;
            op->bit[bitno].bitno = bitno % 8;
            break;
          case 'a':
            op->bit[bitno].type  = AVR_CMDBIT_ADDRESS;
            op->bit[bitno].value = 0;
            op->bit[bitno].bitno = 8*(bitno/8) + bitno % 8;
            break;
          case 'i':
            op->bit[bitno].type  = AVR_CMDBIT_INPUT;
            op->bit[bitno].value = 0;
            op->bit[bitno].bitno = bitno % 8;
            break;
          case 'o':
            op->bit[bitno].type  = AVR_CMDBIT_OUTPUT;
            op->bit[bitno].value = 0;
            op->bit[bitno].bitno = bitno % 8;
            break;
          default :
            yyerror("invalid bit specifier '%c'", ch);
            rv = -1;
            break;
        }
      }
      else {
        if (ch == 'a') {
          q = &s[1];
          op->bit[bitno].bitno = strtol(q, &e, 0);
          if ((e == q)||(*e != 0)) {
            yyerror("can't parse bit number from \"%s\"", q);
            rv = -1;
            break;
          }
          op->bit[bitno].type = AVR_CMDBIT_ADDRESS;
          op->bit[bitno].value = 0;
        }
        else {
          yyerror("invalid bit specifier \"%s\"", s);
          rv = -1;
          break;
        }
      }

      s = strtok_r(NULL, " ", &brkt);
    } /* while */

    free_token(t);

  }  /* while */

  return rv;
}
