bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bison-token-table-option.skel


From: Marc Autret
Subject: bison-token-table-option.skel
Date: 27 Nov 2001 16:54:31 -0500
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

An example of skeleton for the --token-table.
Of course, we can talk about the usefulness of
--no-parser and --token-table.



/* -*- C -*- */

/* A Bison output, made from %%filename
   by GNU bison %%version.  */

/* Skeleton output tables for bison,
   Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

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

/* Copy the user declarations.  */
#line %%input_line "%%filename"
%%prologue

#line %%line "%%skeleton"

#ifndef YYSTYPE
typedef %%stype yystype;
# define YYSTYPE yystype
#endif

/* Tokens.  */
%%tokendef

#line %%line "%%skeleton"

#ifndef YYLTYPE
typedef struct yyltype
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
} yyltype;
# define YYLTYPE %%ltype
#endif

#define YYFINAL         %%final
#define YYFLAG          %%flag
#define YYNTBASE        %%ntbase
#define YYLAST          %%last

#define YYNTOKENS       %%ntokens
#define YYNNTS          %%nnts
#define YYNRULES        %%nrules
#define YYNSTATES       %%nstates
#define YYMAXUTOK       %%maxtok

/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX.  */
#define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym)

/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX.  */
static const char yytranslate[] =
{
  %%translate
};

#if YYDEBUG
static const short yyprhs[] =
{
  %%prhs
};

static const short yyrhs[] =
{
  %%rhs
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const short yyrline[] =
{
  %%rline
};
#endif

#if %%error_verbose
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM.  */
static const char *const yytname[] =
{
  %%tname
};
#endif

/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX.  */
static const short yytoknum[] =
{
  %%toknum
};

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const short yyr1[] =
{
  %%r1
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const short yyr2[] =
{
  %%r2
};

/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
   doesn't specify something else to do.  Zero means the default is an
   error.  */
static const short yydefact[] =
{
  %%defact
};

static const short yydefgoto[] =
{
  %%defgoto
};

static const short yypact[] =
{
  %%pact
};

static const short yypgoto[] =
{
  %%pgoto
};

static const short yytable[] =
{
  %%table
};

static const short yycheck[] =
{
  %%check
};

#line %%input_line "%%filename"
%%epilogue


-- 
Marc Autret



reply via email to

[Prev in Thread] Current Thread [Next in Thread]