[Top][All Lists]

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

no-parser option

From: Marc Autret
Subject: no-parser option
Date: Fri, 23 Nov 2001 15:37:43 -0500


Just below, an idea of what could be the
skeleton for the no parser option of

/* -*- C -*- */

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

/* Skeleton for no-parser option of Bison,
   Copyright 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
   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.  */

/* If name_prefix is used, we take care about it here.  */
#define yylval %%prefix##lval

#line %%input_line "%%filename"
/* Copy the prologue of the input file here.  */

#line %%line "%%skeleton"

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

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

/* Tokens definitions  */

/* List of constants computed by Bison.  */
#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[] =

static const short yyprhs[] =

static const short yyrhs[] =

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const short yyrline[] =

/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM.  */
static const char *const yytname[] =

/* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX.  */
static const short yytoknum[] =

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

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

/* 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[] =

static const short yydefgoto[] =

static const short yypact[] =

static const short yypgoto[] =

static const short yytable[] =

static const short yycheck[] =

#define YYEMPTY         -2
#define YYEOF           0

#define YYTERROR        1
#define YYERRCODE       256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).

   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
   first token.  By default, to implement support for ranges, extend
   its range to the last symbol.  */

# define YYLLOC_DEFAULT(Current, Rhs, N)        \
   Current.last_line   = Rhs[N].last_line;      \
   Current.last_column = Rhs[N].last_column;

/* %%locations_flag is 1 when --locations or 
   %locations is specified.  */
#if %%locations_flag
YYLTYPE yylloc;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

#line %%input_line "%%filename"

reply via email to

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