[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 |
Hi,
Just below, an idea of what could be the
skeleton for the no parser option of
Bison.
/* -*- 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
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. */
/* 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. */
%%prologue
#line %%line "%%skeleton"
#ifndef YYSTYPE
typedef %%stype yystype;
# define YYSTYPE yystype
#endif
#ifndef YYLTYPE
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE %%ltype
#endif
/* Tokens definitions */
%%tokendef
/* 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[] =
{
%%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 YYDEBUG || YYERROR_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
};
#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. */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* %%locations_flag is 1 when --locations or
%locations is specified. */
#if %%locations_flag
YYLTYPE yylloc;
#endif
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
#line %%input_line "%%filename"
%%epilogue
- no-parser option,
Marc Autret <=