bison-2.4.1.tar.gz


如果没有编译安装此文件,在编译安装libpcap时,就会出现 "configure: WARNING: don't have both flex and bison; reverting to lex/yacc checking for capable lex... insufficient" 的错误提示。
资源截图
代码片段和文件信息
                                                                    -*- C -*-

# GLR skeleton for Bison
# Copyright (C) 2002 2003 2004 2005 2006 2007 2008 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 .


m4_include(b4_pkgdatadir/[c.m4])

## ---------------- ##
## Default values.  ##
## ---------------- ##

# Stack parameters.
m4_define_default([b4_stack_depth_max] [10000])
m4_define_default([b4_stack_depth_init]  [200])



## ------------------------ ##
## Pure/impure interfaces.  ##
## ------------------------ ##

b4_define_flag_if([pure])
# If glr.cc is including this file and thus has already set b4_pure_flag don‘t
# change the value of b4_pure_flag and don‘t record a use of api.pure.
m4_ifndef([b4_pure_flag]
[b4_percent_define_default([[api.pure]] [[false]])
 m4_define([b4_pure_flag]
           [b4_percent_define_flag_if([[api.pure]] [[1]] [[0]])])])

# b4_user_formals
# ---------------
# The possible parse-params formal arguments preceded by a comma.
#
# This is not shared with yacc.c in c.m4 because  GLR relies on ISO C
# formal argument declarations.
m4_define([b4_user_formals]
[m4_ifset([b4_parse_param] [ b4_c_ansi_formals(b4_parse_param)])])


# b4_lex_param
# ------------
# Accumule in b4_lex_param all the yylex arguments.
# Yes this is quite ugly...
m4_define([b4_lex_param]
m4_dquote(b4_pure_if([[[[YYSTYPE *]] [[&yylval]]][]dnl
b4_locations_if([ [[YYLTYPE *] [&yylloc]]])])dnl
m4_ifdef([b4_lex_param] [ ]b4_lex_param)))


# b4_yyerror_args
# ---------------
# Optional effective arguments passed to yyerror: user args plus yylloc and
# a trailing comma.
m4_define([b4_yyerror_args]
[b4_pure_if([b4_locations_if([yylocp ])])dnl
m4_ifset([b4_parse_param] [b4_c_args(b4_parse_param) ])])


# b4_lyyerror_args
# ----------------
# Same as above but on the lookahead hence &yylloc instead of yylocp.
m4_define([b4_lyyerror_args]
[b4_pure_if([b4_locations_if([&yylloc ])])dnl
m4_ifset([b4_parse_param] [b4_c_args(b4_parse_param) ])])


# b4_pure_args
# ------------
# Same as b4_yyerror_args but with a leading comma.
m4_define([b4_pure_args]
[b4_pure_if([b4_locations_if([ yylocp])])[]b4_user_args])


# b4_lpure_args
# -------------
# Same as above but on the lookahead hence &yylloc instead of yylocp.
m4_define([b4_lpure_args]
[b4_pure_if([b4_locations_if([ &yylloc])])[]b4_user_args])


# b4_pure_formals

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)