Source
This commit is contained in:
Родитель
2f21b500df
Коммит
1bc9dbfd53
|
@ -0,0 +1,9 @@
|
|||
This directory contains the Windows binaries of various tools such as bison
|
||||
from the GnuWin32 project (http://gnuwin32.sourceforge.net/). We've put them
|
||||
here for your convenience, as they are needed to build projects such as
|
||||
QtWebKit.
|
||||
|
||||
Aside from GnuWin32 binaries this directory also contains a distribution of Win
|
||||
flex-bison project (http://sourceforge.net/projects/winflexbison/), which provides
|
||||
much newer ports of Flex and Bison than what GnuWin32 provides.
|
||||
|
Двоичный файл не отображается.
|
@ -0,0 +1,2 @@
|
|||
#! /bin/sh
|
||||
exec 'c:/progra~1/bison/bin/bison' -y "$@"
|
|
@ -0,0 +1,70 @@
|
|||
-*- outline -*-
|
||||
|
||||
This directory contains data needed by Bison.
|
||||
|
||||
* Skeletons
|
||||
Bison skeletons: the general shapes of the different parser kinds,
|
||||
that are specialized for specific grammars by the bison program.
|
||||
|
||||
Currently, the supported skeletons are:
|
||||
|
||||
- yacc.c
|
||||
It used to be named bison.simple: it corresponds to C Yacc
|
||||
compatible LALR(1) parsers.
|
||||
|
||||
- lalr1.cc
|
||||
Produces a C++ parser class.
|
||||
|
||||
- lalr1.java
|
||||
Produces a Java parser class.
|
||||
|
||||
- glr.c
|
||||
A Generalized LR C parser based on Bison's LALR(1) tables.
|
||||
|
||||
- glr.cc
|
||||
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
|
||||
|
||||
These skeletons are the only ones supported by the Bison team.
|
||||
Because the interface between skeletons and the bison program is not
|
||||
finished, *we are not bound to it*. In particular, Bison is not
|
||||
mature enough for us to consider that "foreign skeletons" are
|
||||
supported.
|
||||
|
||||
* m4sugar
|
||||
This directory contains M4sugar, sort of an extended library for M4,
|
||||
which is used by Bison to instantiate the skeletons.
|
||||
|
||||
* xslt
|
||||
This directory contains XSLT programs that transform Bison's XML output
|
||||
into various formats.
|
||||
|
||||
- bison.xsl
|
||||
A library of routines used by the other XSLT programs.
|
||||
|
||||
- xml2dot.xsl
|
||||
Conversion into GraphViz's dot format.
|
||||
|
||||
- xml2text.xsl
|
||||
Conversion into text.
|
||||
|
||||
- xml2xhtml.xsl
|
||||
Conversion into XHTML.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,26 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# C++ skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
|
||||
b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
|
||||
|
||||
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.cc]])
|
||||
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
|
||||
|
||||
m4_include(b4_used_skeleton)
|
|
@ -0,0 +1,544 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_include(b4_pkgdatadir/[c.m4])
|
||||
|
||||
# b4_comment(TEXT, [PREFIX])
|
||||
# --------------------------
|
||||
# Put TEXT in comment. Prefix all the output lines with PREFIX.
|
||||
m4_define([b4_comment],
|
||||
[b4_comment_([$1], [$2// ], [$2// ])])
|
||||
|
||||
## -------- ##
|
||||
## Checks. ##
|
||||
## -------- ##
|
||||
|
||||
b4_percent_define_check_kind([api.namespace], [code], [deprecated])
|
||||
b4_percent_define_check_kind([parser_class_name], [code], [deprecated])
|
||||
|
||||
## ---------------- ##
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
b4_percent_define_default([[parser_class_name]], [[parser]])
|
||||
|
||||
# Don't do that so that we remember whether we're using a user
|
||||
# request, or the default value.
|
||||
#
|
||||
# b4_percent_define_default([[api.location.type]], [[location]])
|
||||
|
||||
b4_percent_define_default([[filename_type]], [[std::string]])
|
||||
# Make it a warning for those who used betas of Bison 3.0.
|
||||
b4_percent_define_default([[api.namespace]], m4_defn([b4_prefix]))
|
||||
|
||||
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
|
||||
b4_percent_define_default([[define_location_comparison]],
|
||||
[m4_if(b4_percent_define_get([[filename_type]]),
|
||||
[std::string], [[true]], [[false]])])
|
||||
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Namespace. ##
|
||||
## ----------- ##
|
||||
|
||||
m4_define([b4_namespace_ref], [b4_percent_define_get([[api.namespace]])])
|
||||
|
||||
|
||||
# Don't permit an empty b4_namespace_ref. Any '::parser::foo' appended to it
|
||||
# would compile as an absolute reference with 'parser' in the global namespace.
|
||||
# b4_namespace_open would open an anonymous namespace and thus establish
|
||||
# internal linkage. This would compile. However, it's cryptic, and internal
|
||||
# linkage for the parser would be specified in all translation units that
|
||||
# include the header, which is always generated. If we ever need to permit
|
||||
# internal linkage somehow, surely we can find a cleaner approach.
|
||||
m4_if(m4_bregexp(b4_namespace_ref, [^[ ]*$]), [-1], [],
|
||||
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
|
||||
[[namespace reference is empty]])])
|
||||
|
||||
# Instead of assuming the C++ compiler will do it, Bison should reject any
|
||||
# invalid b4_namepsace_ref that would be converted to a valid
|
||||
# b4_namespace_open. The problem is that Bison doesn't always output
|
||||
# b4_namespace_ref to uncommented code but should reserve the ability to do so
|
||||
# in future releases without risking breaking any existing user grammars.
|
||||
# Specifically, don't allow empty names as b4_namespace_open would just convert
|
||||
# those into anonymous namespaces, and that might tempt some users.
|
||||
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*::]), [-1], [],
|
||||
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
|
||||
[[namespace reference has consecutive "::"]])])
|
||||
m4_if(m4_bregexp(b4_namespace_ref, [::[ ]*$]), [-1], [],
|
||||
[b4_complain_at(b4_percent_define_get_loc([[api.namespace]]),
|
||||
[[namespace reference has a trailing "::"]])])
|
||||
|
||||
m4_define([b4_namespace_open],
|
||||
[b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
|
||||
[namespace ]m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
|
||||
[^\(.\)[ ]*::], [\1])),
|
||||
[::], [ { namespace ])[ {]])])
|
||||
|
||||
m4_define([b4_namespace_close],
|
||||
[b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
|
||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*],
|
||||
[\1])),
|
||||
[::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||
|
||||
|
||||
# b4_token_enums
|
||||
# --------------
|
||||
# Output the definition of the tokens as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[[enum yytokentype
|
||||
{
|
||||
]m4_join([,
|
||||
],
|
||||
b4_symbol_map([b4_token_enum]))[
|
||||
};]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Semantic Values. ##
|
||||
## ----------------- ##
|
||||
|
||||
|
||||
|
||||
# b4_value_type_declare
|
||||
# ---------------------
|
||||
# Declare semantic_type.
|
||||
m4_define([b4_value_type_declare],
|
||||
[b4_value_type_setup[]dnl
|
||||
[ /// Symbol semantic values.
|
||||
]m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
|
||||
[code],
|
||||
[[ typedef ]b4_percent_define_get([[api.value.type]])[ semantic_type;]],
|
||||
[m4_bmatch(b4_percent_define_get([[api.value.type]]),
|
||||
[union\|union-directive],
|
||||
[[ union semantic_type
|
||||
{
|
||||
]b4_user_union_members[
|
||||
};]])])dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_public_types_declare
|
||||
# -----------------------
|
||||
# Define the public types: token, semantic value, location, and so forth.
|
||||
# Depending on %define token_lex, may be output in the header or source file.
|
||||
m4_define([b4_public_types_declare],
|
||||
[[#ifndef ]b4_api_PREFIX[STYPE
|
||||
]b4_value_type_declare[
|
||||
#else
|
||||
typedef ]b4_api_PREFIX[STYPE semantic_type;
|
||||
#endif]b4_locations_if([
|
||||
/// Symbol locations.
|
||||
typedef b4_percent_define_get([[api.location.type]],
|
||||
[[location]]) location_type;])[
|
||||
|
||||
/// Syntax errors thrown from user actions.
|
||||
struct syntax_error : std::runtime_error
|
||||
{
|
||||
syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m);]b4_locations_if([
|
||||
location_type location;])[
|
||||
};
|
||||
|
||||
/// Tokens.
|
||||
struct token
|
||||
{
|
||||
]b4_token_enums[
|
||||
};
|
||||
|
||||
/// (External) token type, as returned by yylex.
|
||||
typedef token::yytokentype token_type;
|
||||
|
||||
/// Internal symbol number.
|
||||
typedef int symbol_number_type;
|
||||
|
||||
/// Internal symbol number for tokens (subsumed by symbol_number_type).
|
||||
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
|
||||
|
||||
/// A complete symbol.
|
||||
///
|
||||
/// Expects its Base type to provide access to the symbol type
|
||||
/// via type_get().
|
||||
///
|
||||
/// Provide access to semantic value]b4_locations_if([ and location])[.
|
||||
template <typename Base>
|
||||
struct basic_symbol : Base
|
||||
{
|
||||
/// Alias to Base.
|
||||
typedef Base super_type;
|
||||
|
||||
/// Default constructor.
|
||||
basic_symbol ();
|
||||
|
||||
/// Copy constructor.
|
||||
basic_symbol (const basic_symbol& other);
|
||||
]b4_variant_if([[
|
||||
/// Constructor for valueless symbols, and symbols from each type.
|
||||
]b4_type_foreach([b4_basic_symbol_constructor_declare])], [[
|
||||
/// Constructor for valueless symbols.
|
||||
basic_symbol (typename Base::kind_type t]b4_locations_if([,
|
||||
const location_type& l])[);]])[
|
||||
|
||||
/// Constructor for symbols with semantic value.
|
||||
basic_symbol (typename Base::kind_type t,
|
||||
const semantic_type& v]b4_locations_if([,
|
||||
const location_type& l])[);
|
||||
|
||||
~basic_symbol ();
|
||||
|
||||
/// Destructive move, \a s is emptied into this.
|
||||
void move (basic_symbol& s);
|
||||
|
||||
/// The semantic value.
|
||||
semantic_type value;]b4_locations_if([
|
||||
|
||||
/// The location.
|
||||
location_type location;])[
|
||||
|
||||
private:
|
||||
/// Assignment operator.
|
||||
basic_symbol& operator= (const basic_symbol& other);
|
||||
};
|
||||
|
||||
/// Type access provider for token (enum) based symbols.
|
||||
struct by_type
|
||||
{
|
||||
/// Default constructor.
|
||||
by_type ();
|
||||
|
||||
/// Copy constructor.
|
||||
by_type (const by_type& other);
|
||||
|
||||
/// The symbol type as needed by the constructor.
|
||||
typedef token_type kind_type;
|
||||
|
||||
/// Constructor from (external) token numbers.
|
||||
by_type (kind_type t);
|
||||
|
||||
/// Steal the symbol type from \a that.
|
||||
void move (by_type& that);
|
||||
|
||||
/// The (internal) type number (corresponding to \a type).
|
||||
/// -1 when this symbol is empty.
|
||||
symbol_number_type type_get () const;
|
||||
|
||||
/// The token.
|
||||
token_type token () const;
|
||||
|
||||
enum { empty = 0 };
|
||||
|
||||
/// The symbol type.
|
||||
/// -1 when this symbol is empty.
|
||||
token_number_type type;
|
||||
};
|
||||
|
||||
/// "External" symbols: returned by the scanner.
|
||||
typedef basic_symbol<by_type> symbol_type;
|
||||
|
||||
]b4_symbol_constructor_declare])
|
||||
|
||||
|
||||
# b4_public_types_define
|
||||
# ----------------------
|
||||
# Provide the implementation needed by the public types.
|
||||
m4_define([b4_public_types_define],
|
||||
[[ inline
|
||||
]b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
|
||||
: std::runtime_error (m)]b4_locations_if([
|
||||
, location (l)])[
|
||||
{}
|
||||
|
||||
// basic_symbol.
|
||||
template <typename Base>
|
||||
inline
|
||||
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
|
||||
: value ()
|
||||
{}
|
||||
|
||||
template <typename Base>
|
||||
inline
|
||||
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
|
||||
: Base (other)
|
||||
, value ()]b4_locations_if([
|
||||
, location (other.location)])[
|
||||
{
|
||||
]b4_variant_if([b4_symbol_variant([other.type_get ()], [value], [copy],
|
||||
[other.value])],
|
||||
[value = other.value;])[
|
||||
}
|
||||
|
||||
|
||||
template <typename Base>
|
||||
inline
|
||||
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
|
||||
[typename Base::kind_type t],
|
||||
[const semantic_type& v],
|
||||
b4_locations_if([const location_type& l]))[)
|
||||
: Base (t)
|
||||
, value (]b4_variant_if([], [v])[)]b4_locations_if([
|
||||
, location (l)])[
|
||||
{]b4_variant_if([[
|
||||
(void) v;
|
||||
]b4_symbol_variant([this->type_get ()], [value], [copy], [v])])[}
|
||||
|
||||
]b4_variant_if([[
|
||||
// Implementation of basic_symbol constructor for each type.
|
||||
]b4_type_foreach([b4_basic_symbol_constructor_define])], [[
|
||||
/// Constructor for valueless symbols.
|
||||
template <typename Base>
|
||||
inline
|
||||
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
|
||||
[typename Base::kind_type t],
|
||||
b4_locations_if([const location_type& l]))[)
|
||||
: Base (t)
|
||||
, value ()]b4_locations_if([
|
||||
, location (l)])[
|
||||
{}]])[
|
||||
|
||||
template <typename Base>
|
||||
inline
|
||||
]b4_parser_class_name[::basic_symbol<Base>::~basic_symbol ()
|
||||
{]b4_variant_if([[
|
||||
// User destructor.
|
||||
symbol_number_type yytype = this->type_get ();
|
||||
switch (yytype)
|
||||
{
|
||||
]b4_symbol_foreach([b4_symbol_destructor])dnl
|
||||
[ default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Type destructor.
|
||||
]b4_symbol_variant([[yytype]], [[value]], [[template destroy]])])[
|
||||
}
|
||||
|
||||
template <typename Base>
|
||||
inline
|
||||
void
|
||||
]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
|
||||
{
|
||||
super_type::move(s);
|
||||
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [move],
|
||||
[s.value])],
|
||||
[value = s.value;])[]b4_locations_if([
|
||||
location = s.location;])[
|
||||
}
|
||||
|
||||
// by_type.
|
||||
inline
|
||||
]b4_parser_class_name[::by_type::by_type ()
|
||||
: type (empty)
|
||||
{}
|
||||
|
||||
inline
|
||||
]b4_parser_class_name[::by_type::by_type (const by_type& other)
|
||||
: type (other.type)
|
||||
{}
|
||||
|
||||
inline
|
||||
]b4_parser_class_name[::by_type::by_type (token_type t)
|
||||
: type (yytranslate_ (t))
|
||||
{}
|
||||
|
||||
inline
|
||||
void
|
||||
]b4_parser_class_name[::by_type::move (by_type& that)
|
||||
{
|
||||
type = that.type;
|
||||
that.type = empty;
|
||||
}
|
||||
|
||||
inline
|
||||
int
|
||||
]b4_parser_class_name[::by_type::type_get () const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
]b4_token_ctor_if([[
|
||||
inline
|
||||
]b4_parser_class_name[::token_type
|
||||
]b4_parser_class_name[::by_type::token () const
|
||||
{
|
||||
// YYTOKNUM[NUM] -- (External) token number corresponding to the
|
||||
// (internal) symbol number NUM (which must be that of a token). */
|
||||
static
|
||||
const ]b4_int_type_for([b4_toknum])[
|
||||
yytoken_number_[] =
|
||||
{
|
||||
]b4_toknum[
|
||||
};
|
||||
return static_cast<token_type> (yytoken_number_[type]);
|
||||
}
|
||||
]])[]dnl
|
||||
b4_symbol_constructor_define])
|
||||
|
||||
|
||||
# b4_symbol_constructor_declare
|
||||
# b4_symbol_constructor_define
|
||||
# -----------------------------
|
||||
# Declare/define symbol constructors for all the value types.
|
||||
# Use at class-level. Redefined in variant.hh.
|
||||
m4_define([b4_symbol_constructor_declare], [])
|
||||
m4_define([b4_symbol_constructor_define], [])
|
||||
|
||||
|
||||
# b4_yytranslate_define
|
||||
# ---------------------
|
||||
# Define yytranslate_. Sometimes used in the header file,
|
||||
# sometimes in the cc file.
|
||||
m4_define([b4_yytranslate_define],
|
||||
[[ // Symbol number corresponding to token number t.
|
||||
inline
|
||||
]b4_parser_class_name[::token_number_type
|
||||
]b4_parser_class_name[::yytranslate_ (]b4_token_ctor_if([token_type],
|
||||
[int])[ t)
|
||||
{
|
||||
static
|
||||
const token_number_type
|
||||
translate_table[] =
|
||||
{
|
||||
]b4_translate[
|
||||
};
|
||||
const unsigned int user_token_number_max_ = ]b4_user_token_number_max[;
|
||||
const token_number_type undef_token_ = ]b4_undef_token_number[;
|
||||
|
||||
if (static_cast<int>(t) <= yyeof_)
|
||||
return yyeof_;
|
||||
else if (static_cast<unsigned int> (t) <= user_token_number_max_)
|
||||
return translate_table[t];
|
||||
else
|
||||
return undef_token_;
|
||||
}
|
||||
]])
|
||||
|
||||
|
||||
# b4_lhs_value([TYPE])
|
||||
# --------------------
|
||||
# Expansion of $<TYPE>$.
|
||||
m4_define([b4_lhs_value],
|
||||
[b4_symbol_value([yyval], [$1])])
|
||||
|
||||
|
||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||
# --------------------------------------
|
||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||
# symbols on RHS.
|
||||
m4_define([b4_rhs_value],
|
||||
[b4_symbol_value([yysemantic_stack_@{($1) - ($2)@}], [$3])])
|
||||
|
||||
|
||||
# b4_lhs_location()
|
||||
# -----------------
|
||||
# Expansion of @$.
|
||||
m4_define([b4_lhs_location],
|
||||
[(yyloc)])
|
||||
|
||||
|
||||
# b4_rhs_location(RULE-LENGTH, NUM)
|
||||
# ---------------------------------
|
||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||
# on RHS.
|
||||
m4_define([b4_rhs_location],
|
||||
[(yylocation_stack_@{($1) - ($2)@})])
|
||||
|
||||
|
||||
# b4_parse_param_decl
|
||||
# -------------------
|
||||
# Extra formal arguments of the constructor.
|
||||
# Change the parameter names from "foo" into "foo_yyarg", so that
|
||||
# there is no collision bw the user chosen attribute name, and the
|
||||
# argument name in the constructor.
|
||||
m4_define([b4_parse_param_decl],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
|
||||
|
||||
m4_define([b4_parse_param_decl_1],
|
||||
[$1_yyarg])
|
||||
|
||||
|
||||
|
||||
# b4_parse_param_cons
|
||||
# -------------------
|
||||
# Extra initialisations of the constructor.
|
||||
m4_define([b4_parse_param_cons],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
b4_cc_constructor_calls(b4_parse_param)])])
|
||||
m4_define([b4_cc_constructor_calls],
|
||||
[m4_map_sep([b4_cc_constructor_call], [,
|
||||
], [$@])])
|
||||
m4_define([b4_cc_constructor_call],
|
||||
[$2 ($2_yyarg)])
|
||||
|
||||
# b4_parse_param_vars
|
||||
# -------------------
|
||||
# Extra instance variables.
|
||||
m4_define([b4_parse_param_vars],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
// User arguments.
|
||||
b4_cc_var_decls(b4_parse_param)])])
|
||||
m4_define([b4_cc_var_decls],
|
||||
[m4_map_sep([b4_cc_var_decl], [
|
||||
], [$@])])
|
||||
m4_define([b4_cc_var_decl],
|
||||
[ $1;])
|
||||
|
||||
|
||||
## ---------##
|
||||
## Values. ##
|
||||
## ---------##
|
||||
|
||||
# b4_yylloc_default_define
|
||||
# ------------------------
|
||||
# Define YYLLOC_DEFAULT.
|
||||
m4_define([b4_yylloc_default_define],
|
||||
[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
# ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
while (/*CONSTCOND*/ false)
|
||||
# endif
|
||||
]])
|
||||
|
||||
## -------- ##
|
||||
## Checks. ##
|
||||
## -------- ##
|
||||
|
||||
b4_token_ctor_if([b4_variant_if([],
|
||||
[b4_fatal_at(b4_percent_define_get_loc(api.token.constructor),
|
||||
[cannot use '%s' without '%s'],
|
||||
[%define api.token.constructor],
|
||||
[%define api.value.type variant]))])])
|
|
@ -0,0 +1,65 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# Common code for C-like languages (C, C++, Java, etc.)
|
||||
|
||||
# Copyright (C) 2012-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# b4_comment_(TEXT, OPEN, CONTINUE, END)
|
||||
# --------------------------------------
|
||||
# Put TEXT in comment. Avoid trailing spaces: don't indent empty lines.
|
||||
# Avoid adding indentation to the first line, as the indentation comes
|
||||
# from OPEN. That's why we don't patsubst([$1], [^\(.\)], [ \1]).
|
||||
#
|
||||
# Prefix all the output lines with PREFIX.
|
||||
m4_define([b4_comment_],
|
||||
[$2[]m4_bpatsubst(m4_expand([[$1]]), [
|
||||
\(.\)], [
|
||||
$3\1])$4])
|
||||
|
||||
|
||||
# b4_comment(TEXT, [PREFIX])
|
||||
# --------------------------
|
||||
# Put TEXT in comment. Prefix all the output lines with PREFIX.
|
||||
m4_define([b4_comment],
|
||||
[b4_comment_([$1], [$2/* ], [$2 ], [ */])])
|
||||
|
||||
|
||||
|
||||
|
||||
# b4_dollar_dollar_(VALUE, FIELD, DEFAULT-FIELD)
|
||||
# ----------------------------------------------
|
||||
# If FIELD (or DEFAULT-FIELD) is non-null, return "VALUE.FIELD",
|
||||
# otherwise just VALUE. Be sure to pass "(VALUE)" is VALUE is a
|
||||
# pointer.
|
||||
m4_define([b4_dollar_dollar_],
|
||||
[b4_symbol_value([$1],
|
||||
m4_if([$2], [[]],
|
||||
[[$3]], [[$2]]))])
|
||||
|
||||
# b4_dollar_pushdef(VALUE-POINTER, DEFAULT-FIELD, LOCATION)
|
||||
# b4_dollar_popdef
|
||||
# ---------------------------------------------------------
|
||||
# Define b4_dollar_dollar for VALUE and DEFAULT-FIELD,
|
||||
# and b4_at_dollar for LOCATION.
|
||||
m4_define([b4_dollar_pushdef],
|
||||
[m4_pushdef([b4_dollar_dollar],
|
||||
[b4_dollar_dollar_([$1], m4_dquote($][1), [$2])])dnl
|
||||
m4_pushdef([b4_at_dollar], [$3])dnl
|
||||
])
|
||||
m4_define([b4_dollar_popdef],
|
||||
[m4_popdef([b4_at_dollar])dnl
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
])
|
|
@ -0,0 +1,26 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# C skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
|
||||
b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
|
||||
|
||||
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[yacc.c]])
|
||||
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
|
||||
|
||||
m4_include(b4_used_skeleton)
|
|
@ -0,0 +1,839 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
|
||||
# Copyright (C) 2002, 2004-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_include(b4_pkgdatadir/[c-like.m4])
|
||||
|
||||
# b4_tocpp(STRING)
|
||||
# ----------------
|
||||
# Convert STRING into a valid C macro name.
|
||||
m4_define([b4_tocpp],
|
||||
[m4_toupper(m4_bpatsubst(m4_quote($1), [[^a-zA-Z0-9]+], [_]))])
|
||||
|
||||
|
||||
# b4_cpp_guard(FILE)
|
||||
# ------------------
|
||||
# A valid C macro name to use as a CPP header guard for FILE.
|
||||
m4_define([b4_cpp_guard],
|
||||
[[YY_]b4_tocpp(m4_defn([b4_prefix])/[$1])[_INCLUDED]])
|
||||
|
||||
|
||||
# b4_cpp_guard_open(FILE)
|
||||
# b4_cpp_guard_close(FILE)
|
||||
# ------------------------
|
||||
# If FILE does not expand to nothing, open/close CPP inclusion guards for FILE.
|
||||
m4_define([b4_cpp_guard_open],
|
||||
[m4_ifval(m4_quote($1),
|
||||
[#ifndef b4_cpp_guard([$1])
|
||||
# define b4_cpp_guard([$1])])])
|
||||
|
||||
m4_define([b4_cpp_guard_close],
|
||||
[m4_ifval(m4_quote($1),
|
||||
[#endif b4_comment([!b4_cpp_guard([$1])])])])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Identification. ##
|
||||
## ---------------- ##
|
||||
|
||||
# b4_identification
|
||||
# -----------------
|
||||
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
|
||||
# b4_pull_flag if they use the values of the %define variables api.pure or
|
||||
# api.push-pull.
|
||||
m4_define([b4_identification],
|
||||
[[/* Identify Bison output. */
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "]b4_version["
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[
|
||||
|
||||
/* Pure parsers. */
|
||||
#define YYPURE ]b4_pure_flag])[]m4_ifdef([b4_push_flag], [[
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH ]b4_push_flag])[]m4_ifdef([b4_pull_flag], [[
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL ]b4_pull_flag])[
|
||||
]])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
# b4_api_prefix, b4_api_PREFIX
|
||||
# ----------------------------
|
||||
# Corresponds to %define api.prefix
|
||||
b4_percent_define_default([[api.prefix]], [[yy]])
|
||||
m4_define([b4_api_prefix],
|
||||
[b4_percent_define_get([[api.prefix]])])
|
||||
m4_define([b4_api_PREFIX],
|
||||
[m4_toupper(b4_api_prefix)])
|
||||
|
||||
|
||||
# b4_prefix
|
||||
# ---------
|
||||
# If the %name-prefix is not given, it is api.prefix.
|
||||
m4_define_default([b4_prefix], [b4_api_prefix])
|
||||
|
||||
# If the %union is not named, its name is YYSTYPE.
|
||||
m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE])
|
||||
|
||||
|
||||
## ------------------------ ##
|
||||
## Pure/impure interfaces. ##
|
||||
## ------------------------ ##
|
||||
|
||||
# b4_lex_formals
|
||||
# --------------
|
||||
# All the yylex formal arguments.
|
||||
# b4_lex_param arrives quoted twice, but we want to keep only one level.
|
||||
m4_define([b4_lex_formals],
|
||||
[b4_pure_if([[[[YYSTYPE *yylvalp]], [[&yylval]]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE *yyllocp], [&yylloc]]])])dnl
|
||||
m4_ifdef([b4_lex_param], [, ]b4_lex_param)])
|
||||
|
||||
|
||||
# b4_lex
|
||||
# ------
|
||||
# Call yylex.
|
||||
m4_define([b4_lex],
|
||||
[b4_function_call([yylex], [int], b4_lex_formals)])
|
||||
|
||||
|
||||
# b4_user_args
|
||||
# ------------
|
||||
m4_define([b4_user_args],
|
||||
[m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])])
|
||||
|
||||
|
||||
# b4_parse_param
|
||||
# --------------
|
||||
# If defined, b4_parse_param arrives double quoted, but below we prefer
|
||||
# it to be single quoted.
|
||||
m4_define([b4_parse_param],
|
||||
b4_parse_param)
|
||||
|
||||
|
||||
# b4_parse_param_for(DECL, FORMAL, BODY)
|
||||
# ---------------------------------------
|
||||
# Iterate over the user parameters, binding the declaration to DECL,
|
||||
# the formal name to FORMAL, and evaluating the BODY.
|
||||
m4_define([b4_parse_param_for],
|
||||
[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
|
||||
[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl
|
||||
m4_pushdef([$2], m4_shift($1_$2))dnl
|
||||
$3[]dnl
|
||||
m4_popdef([$2])dnl
|
||||
m4_popdef([$1])dnl
|
||||
])])
|
||||
|
||||
# b4_parse_param_use([VAL], [LOC])
|
||||
# --------------------------------
|
||||
# 'YYUSE' VAL, LOC if locations are enabled, and all the parse-params.
|
||||
m4_define([b4_parse_param_use],
|
||||
[m4_ifvaln([$1], [ YYUSE ([$1]);])dnl
|
||||
b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl
|
||||
b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal);
|
||||
])dnl
|
||||
])
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## Data Types. ##
|
||||
## ------------ ##
|
||||
|
||||
# b4_int_type(MIN, MAX)
|
||||
# ---------------------
|
||||
# Return the smallest int type able to handle numbers ranging from
|
||||
# MIN to MAX (included).
|
||||
m4_define([b4_int_type],
|
||||
[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char],
|
||||
b4_ints_in($@, [-128], [127]), [1], [signed char],
|
||||
|
||||
b4_ints_in($@, [0], [65535]), [1], [unsigned short int],
|
||||
b4_ints_in($@, [-32768], [32767]), [1], [short int],
|
||||
|
||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||
|
||||
[int])])
|
||||
|
||||
|
||||
# b4_int_type_for(NAME)
|
||||
# ---------------------
|
||||
# Return the smallest int type able to handle numbers ranging from
|
||||
# 'NAME_min' to 'NAME_max' (included).
|
||||
m4_define([b4_int_type_for],
|
||||
[b4_int_type($1_min, $1_max)])
|
||||
|
||||
|
||||
# b4_table_value_equals(TABLE, VALUE, LITERAL)
|
||||
# --------------------------------------------
|
||||
# Without inducing a comparison warning from the compiler, check if the
|
||||
# literal value LITERAL equals VALUE from table TABLE, which must have
|
||||
# TABLE_min and TABLE_max defined.
|
||||
m4_define([b4_table_value_equals],
|
||||
[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
|
||||
|| m4_indir([b4_]$1[_max]) < $3), [1],
|
||||
[[0]],
|
||||
[(!!(($2) == ($3)))])])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Compiler issues. ##
|
||||
## ----------------- ##
|
||||
|
||||
# b4_attribute_define
|
||||
# -------------------
|
||||
# Provide portability for __attribute__.
|
||||
m4_define([b4_attribute_define],
|
||||
[#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(E) ((void) (E))
|
||||
#else
|
||||
# define YYUSE(E) /* empty */
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# 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
|
||||
])
|
||||
|
||||
|
||||
## ---------##
|
||||
## Values. ##
|
||||
## ---------##
|
||||
|
||||
|
||||
# b4_null_define
|
||||
# --------------
|
||||
# Portability issues: define a YY_NULL appropriate for the current
|
||||
# language (C, C++98, or C++11).
|
||||
m4_define([b4_null_define],
|
||||
[# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_null
|
||||
# -------
|
||||
# Return a null pointer constant.
|
||||
m4_define([b4_null], [YY_NULL])
|
||||
|
||||
# b4_integral_parser_table_define(TABLE-NAME, CONTENT, COMMENT)
|
||||
# -------------------------------------------------------------
|
||||
# Define "yy<TABLE-NAME>" whose contents is CONTENT.
|
||||
m4_define([b4_integral_parser_table_define],
|
||||
[m4_ifvaln([$3], [b4_comment([$3], [ ])])dnl
|
||||
static const b4_int_type_for([$2]) yy$1[[]] =
|
||||
{
|
||||
$2
|
||||
};dnl
|
||||
])
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Assigning token numbers. ##
|
||||
## ------------------------- ##
|
||||
|
||||
# b4_token_define(TOKEN-NUM)
|
||||
# --------------------------
|
||||
# Output the definition of this token as #define.
|
||||
m4_define([b4_token_define],
|
||||
[b4_token_format([#define %s %s], [$1])])
|
||||
|
||||
# b4_token_defines
|
||||
# ----------------
|
||||
# Output the definition of the tokens.
|
||||
m4_define([b4_token_defines],
|
||||
[b4_any_token_visible_if([/* Tokens. */
|
||||
m4_join([
|
||||
], b4_symbol_map([b4_token_define]))
|
||||
])])
|
||||
|
||||
|
||||
# b4_token_enum(TOKEN-NUM)
|
||||
# ------------------------
|
||||
# Output the definition of this token as an enum.
|
||||
m4_define([b4_token_enum],
|
||||
[b4_token_format([%s = %s], [$1])])
|
||||
|
||||
|
||||
# b4_token_enums
|
||||
# --------------
|
||||
# Output the definition of the tokens (if there are) as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[b4_any_token_visible_if([[/* Token type. */
|
||||
#ifndef ]b4_api_PREFIX[TOKENTYPE
|
||||
# define ]b4_api_PREFIX[TOKENTYPE
|
||||
enum ]b4_api_prefix[tokentype
|
||||
{
|
||||
]m4_join([,
|
||||
],
|
||||
b4_symbol_map([b4_token_enum]))[
|
||||
};
|
||||
#endif
|
||||
]])])
|
||||
|
||||
|
||||
# b4_token_enums_defines
|
||||
# ----------------------
|
||||
# Output the definition of the tokens (if there are any) as enums and,
|
||||
# if POSIX Yacc is enabled, as #defines.
|
||||
m4_define([b4_token_enums_defines],
|
||||
[b4_token_enums[]b4_yacc_if([b4_token_defines])])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Semantic Values. ##
|
||||
## ----------------- ##
|
||||
|
||||
|
||||
# b4_symbol_value(VAL, [TYPE])
|
||||
# ----------------------------
|
||||
# Given a semantic value VAL ($$, $1 etc.), extract its value of type
|
||||
# TYPE if TYPE is given, otherwise just return VAL. The result can be
|
||||
# used safetly, it is put in parens to avoid nasty precedence issues.
|
||||
# TYPE is *not* put in braces, provide some if needed.
|
||||
m4_define([b4_symbol_value],
|
||||
[($1[]m4_ifval([$2], [.$2]))])
|
||||
|
||||
|
||||
|
||||
## ---------------------- ##
|
||||
## Defining C functions. ##
|
||||
## ---------------------- ##
|
||||
|
||||
|
||||
# b4_function_define(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# -----------------------------------------------------------
|
||||
# Declare the function NAME in C.
|
||||
m4_define([b4_function_define],
|
||||
[$2
|
||||
$1 (b4_formals(m4_shift2($@)))[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_formals([DECL1, NAME1], ...)
|
||||
# -------------------------------
|
||||
# The formal arguments of a C function definition.
|
||||
m4_define([b4_formals],
|
||||
[m4_if([$#], [0], [void],
|
||||
[$#$1], [1], [void],
|
||||
[m4_map_sep([b4_formal], [, ], [$@])])])
|
||||
|
||||
m4_define([b4_formal],
|
||||
[$1])
|
||||
|
||||
|
||||
|
||||
## ----------------------- ##
|
||||
## Declaring C functions. ##
|
||||
## ----------------------- ##
|
||||
|
||||
|
||||
# b4_function_declare(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# ------------------------------------------------------------
|
||||
# Declare the function NAME.
|
||||
m4_define([b4_function_declare],
|
||||
[$2 $1 (b4_formals(m4_shift2($@)));[]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## --------------------- ##
|
||||
## Calling C functions. ##
|
||||
## --------------------- ##
|
||||
|
||||
|
||||
# b4_function_call(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
|
||||
# -----------------------------------------------------------
|
||||
# Call the function NAME with arguments NAME1, NAME2 etc.
|
||||
m4_define([b4_function_call],
|
||||
[$1 (b4_args(m4_shift2($@)))[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_args([DECL1, NAME1], ...)
|
||||
# ----------------------------
|
||||
# Output the arguments NAME1, NAME2...
|
||||
m4_define([b4_args],
|
||||
[m4_map_sep([b4_arg], [, ], [$@])])
|
||||
|
||||
m4_define([b4_arg],
|
||||
[$2])
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Synclines. ##
|
||||
## ----------- ##
|
||||
|
||||
# b4_sync_start(LINE, FILE)
|
||||
# -------------------------
|
||||
m4_define([b4_sync_start], [[#]line $1 $2])
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## User actions. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_case(LABEL, STATEMENTS)
|
||||
# --------------------------
|
||||
m4_define([b4_case],
|
||||
[ case $1:
|
||||
$2
|
||||
b4_syncline([@oline@], [@ofile@])
|
||||
break;])
|
||||
|
||||
|
||||
# b4_predicate_case(LABEL, CONDITIONS)
|
||||
# ------------------------------------
|
||||
m4_define([b4_predicate_case],
|
||||
[ case $1:
|
||||
if (! ($2)) YYERROR;
|
||||
b4_syncline([@oline@], [@ofile@])
|
||||
break;])
|
||||
|
||||
|
||||
# b4_yydestruct_define
|
||||
# --------------------
|
||||
# Define the "yydestruct" function.
|
||||
m4_define_default([b4_yydestruct_define],
|
||||
[[/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
`-----------------------------------------------*/
|
||||
|
||||
]b4_function_define([yydestruct],
|
||||
[static void],
|
||||
[[const char *yymsg], [yymsg]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE *yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
]b4_parse_param_use([yyvaluep], [yylocationp])dnl
|
||||
[ if (!yymsg)
|
||||
yymsg = "Deleting";
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
]b4_symbol_actions([destructor])[
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
}]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_yy_symbol_print_define
|
||||
# -------------------------
|
||||
# Define the "yy_symbol_print" function.
|
||||
m4_define_default([b4_yy_symbol_print_define],
|
||||
[[
|
||||
/*----------------------------------------.
|
||||
| Print this symbol's value on YYOUTPUT. |
|
||||
`----------------------------------------*/
|
||||
|
||||
]b4_function_define([yy_symbol_value_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
FILE *yyo = yyoutput;
|
||||
]b4_parse_param_use([yyo], [yylocationp])dnl
|
||||
[ if (!yyvaluep)
|
||||
return;]
|
||||
dnl glr.c does not feature yytoknum.
|
||||
m4_if(b4_skeleton, ["yacc.c"],
|
||||
[[# ifdef YYPRINT
|
||||
if (yytype < YYNTOKENS)
|
||||
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
||||
# endif
|
||||
]])dnl
|
||||
b4_symbol_actions([printer])[
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------.
|
||||
| Print this symbol on YYOUTPUT. |
|
||||
`--------------------------------*/
|
||||
|
||||
]b4_function_define([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
YYFPRINTF (yyoutput, "%s %s (",
|
||||
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
|
||||
|
||||
]b4_locations_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
|
||||
YYFPRINTF (yyoutput, ": ");
|
||||
])dnl
|
||||
[ yy_symbol_value_print (yyoutput, yytype, yyvaluep]dnl
|
||||
b4_locations_if([, yylocationp])[]b4_user_args[);
|
||||
YYFPRINTF (yyoutput, ")");
|
||||
}]dnl
|
||||
])
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## api.value.type. ##
|
||||
## ---------------- ##
|
||||
|
||||
|
||||
# ---------------------- #
|
||||
# api.value.type=union. #
|
||||
# ---------------------- #
|
||||
|
||||
# b4_symbol_type_register(SYMBOL-NUM)
|
||||
# -----------------------------------
|
||||
# Symbol SYMBOL-NUM has a type (for variant) instead of a type-tag.
|
||||
# Extend the definition of %union's body with a field of that type,
|
||||
# and extend the symbol's "type" field to point to the field name,
|
||||
# instead of the type name.
|
||||
m4_define([b4_symbol_type_register],
|
||||
[m4_define([b4_symbol($1, type_tag)],
|
||||
[b4_symbol_if([$1], [has_id],
|
||||
[b4_symbol([$1], [id])],
|
||||
[yytype_[]b4_symbol([$1], [number])])])dnl
|
||||
m4_append([b4_user_union_members],
|
||||
m4_expand([
|
||||
b4_symbol_tag_comment([$1])dnl
|
||||
b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);]))
|
||||
])
|
||||
|
||||
|
||||
# b4_type_define_tag(SYMBOL1-NUM, ...)
|
||||
# ------------------------------------
|
||||
# For the batch of symbols SYMBOL1-NUM... (which all have the same
|
||||
# type), enhance the %union definition for each of them, and set
|
||||
# there "type" field to the field tag name, instead of the type name.
|
||||
m4_define([b4_type_define_tag],
|
||||
[b4_symbol_if([$1], [has_type],
|
||||
[m4_map([b4_symbol_type_register], [$@])])
|
||||
])
|
||||
|
||||
|
||||
# b4_symbol_value_union(VAL, [TYPE])
|
||||
# ----------------------------------
|
||||
# Same of b4_symbol_value, but when api.value.type=union.
|
||||
m4_define([b4_symbol_value_union],
|
||||
[m4_ifval([$2],
|
||||
[(*($2*)(&$1))],
|
||||
[$1])])
|
||||
])
|
||||
|
||||
|
||||
# b4_value_type_setup_union
|
||||
# -------------------------
|
||||
# Setup support for api.value.type=union. Symbols are defined with a
|
||||
# type instead of a union member name: build the corresponding union,
|
||||
# and give the symbols their tag.
|
||||
m4_define([b4_value_type_setup_union],
|
||||
[m4_define([b4_union_members])
|
||||
b4_type_foreach([b4_type_define_tag])
|
||||
m4_copy_force([b4_symbol_value_union], [b4_symbol_value])
|
||||
])
|
||||
|
||||
|
||||
# ---------------- #
|
||||
# api.value.type. #
|
||||
# ---------------- #
|
||||
|
||||
|
||||
# b4_value_type_setup_variant
|
||||
# ---------------------------
|
||||
# Setup support for api.value.type=variant. By default, fail, specialized
|
||||
# by other skeletons.
|
||||
m4_define([b4_value_type_setup_variant],
|
||||
[b4_complain_at(b4_percent_define_get_loc([[api.value.type]]),
|
||||
[['%s' does not support '%s']],
|
||||
[b4_skeleton],
|
||||
[%define api.value.type variant])])
|
||||
|
||||
|
||||
# _b4_value_type_setup_keyword
|
||||
# ----------------------------
|
||||
# api.value.type is defined with a keyword/string syntax. Check if
|
||||
# that is properly defined, and prepare its use.
|
||||
m4_define([_b4_value_type_setup_keyword],
|
||||
[b4_percent_define_check_values([[[[api.value.type]],
|
||||
[[none]],
|
||||
[[union]],
|
||||
[[union-directive]],
|
||||
[[variant]],
|
||||
[[yystype]]]])dnl
|
||||
m4_case(b4_percent_define_get([[api.value.type]]),
|
||||
[union], [b4_value_type_setup_union],
|
||||
[variant], [b4_value_type_setup_variant])])
|
||||
|
||||
|
||||
# b4_value_type_setup
|
||||
# -------------------
|
||||
# Check if api.value.type is properly defined, and possibly prepare
|
||||
# its use.
|
||||
b4_define_silent([b4_value_type_setup],
|
||||
[# Define default value.
|
||||
b4_percent_define_ifdef([[api.value.type]], [],
|
||||
[# %union => api.value.type=union-directive
|
||||
m4_ifdef([b4_union_members],
|
||||
[m4_define([b4_percent_define_kind(api.value.type)], [keyword])
|
||||
m4_define([b4_percent_define(api.value.type)], [union-directive])],
|
||||
[# no tag seen => api.value.type={int}
|
||||
m4_if(b4_tag_seen_flag, 0,
|
||||
[m4_define([b4_percent_define_kind(api.value.type)], [code])
|
||||
m4_define([b4_percent_define(api.value.type)], [int])],
|
||||
[# otherwise api.value.type=yystype
|
||||
m4_define([b4_percent_define_kind(api.value.type)], [keyword])
|
||||
m4_define([b4_percent_define(api.value.type)], [yystype])])])])
|
||||
|
||||
# Set up.
|
||||
m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
|
||||
[keyword\|string], [_b4_value_type_setup_keyword])
|
||||
])
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Declarations. ##
|
||||
## -------------- ##
|
||||
|
||||
|
||||
# b4_value_type_define
|
||||
# --------------------
|
||||
m4_define([b4_value_type_define],
|
||||
[b4_value_type_setup[]dnl
|
||||
/* Value type. */
|
||||
m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
|
||||
[code],
|
||||
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
|
||||
typedef ]b4_percent_define_get([[api.value.type]])[ ]b4_api_PREFIX[STYPE;
|
||||
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1
|
||||
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
|
||||
#endif
|
||||
]],
|
||||
[m4_bmatch(b4_percent_define_get([[api.value.type]]),
|
||||
[union\|union-directive],
|
||||
[[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
|
||||
typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE;
|
||||
union ]b4_union_name[
|
||||
{
|
||||
]b4_user_union_members[
|
||||
};
|
||||
# define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1
|
||||
# define ]b4_api_PREFIX[STYPE_IS_DECLARED 1
|
||||
#endif
|
||||
]])])])
|
||||
|
||||
|
||||
# b4_location_type_define
|
||||
# -----------------------
|
||||
m4_define([b4_location_type_define],
|
||||
[[/* Location type. */
|
||||
#if ! defined ]b4_api_PREFIX[LTYPE && ! defined ]b4_api_PREFIX[LTYPE_IS_DECLARED
|
||||
typedef struct ]b4_api_PREFIX[LTYPE ]b4_api_PREFIX[LTYPE;
|
||||
struct ]b4_api_PREFIX[LTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
};
|
||||
# define ]b4_api_PREFIX[LTYPE_IS_DECLARED 1
|
||||
# define ]b4_api_PREFIX[LTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
]])
|
||||
|
||||
|
||||
# b4_declare_yylstype
|
||||
# -------------------
|
||||
# Declarations that might either go into the header (if --defines) or
|
||||
# in the parser body. Declare YYSTYPE/YYLTYPE, and yylval/yylloc.
|
||||
m4_define([b4_declare_yylstype],
|
||||
[b4_value_type_define[]b4_locations_if([
|
||||
b4_location_type_define])
|
||||
|
||||
b4_pure_if([], [[extern ]b4_api_PREFIX[STYPE ]b4_prefix[lval;
|
||||
]b4_locations_if([[extern ]b4_api_PREFIX[LTYPE ]b4_prefix[lloc;]])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# b4_YYDEBUG_define
|
||||
# -----------------
|
||||
m4_define([b4_YYDEBUG_define],
|
||||
[[/* Debug traces. */
|
||||
]m4_if(b4_api_prefix, [yy],
|
||||
[[#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_parse_trace_if([1], [0])[
|
||||
#endif]],
|
||||
[[#ifndef ]b4_api_PREFIX[DEBUG
|
||||
# if defined YYDEBUG
|
||||
#if YYDEBUG
|
||||
# define ]b4_api_PREFIX[DEBUG 1
|
||||
# else
|
||||
# define ]b4_api_PREFIX[DEBUG 0
|
||||
# endif
|
||||
# else /* ! defined YYDEBUG */
|
||||
# define ]b4_api_PREFIX[DEBUG ]b4_parse_trace_if([1], [0])[
|
||||
# endif /* ! defined YYDEBUG */
|
||||
#endif /* ! defined ]b4_api_PREFIX[DEBUG */]])[]dnl
|
||||
])
|
||||
|
||||
# b4_declare_yydebug
|
||||
# ------------------
|
||||
m4_define([b4_declare_yydebug],
|
||||
[b4_YYDEBUG_define[
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
extern int ]b4_prefix[debug;
|
||||
#endif][]dnl
|
||||
])
|
||||
|
||||
# b4_yylloc_default_define
|
||||
# ------------------------
|
||||
# Define YYLLOC_DEFAULT.
|
||||
m4_define([b4_yylloc_default_define],
|
||||
[[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
]])
|
||||
|
||||
# b4_yy_location_print_define
|
||||
# ---------------------------
|
||||
# Define YY_LOCATION_PRINT.
|
||||
m4_define([b4_yy_location_print_define],
|
||||
[b4_locations_if([[
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
]b4_function_define([yy_location_print_],
|
||||
[static unsigned],
|
||||
[[FILE *yyo], [yyo]],
|
||||
[[YYLTYPE const * const yylocp], [yylocp]])[
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += YYFPRINTF (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += YYFPRINTF (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += YYFPRINTF (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
#endif]],
|
||||
[[/* This macro is provided for backward compatibility. */
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
#endif]])
|
||||
])
|
||||
|
||||
# b4_yyloc_default
|
||||
# ----------------
|
||||
# Expand to a possible default value for yylloc.
|
||||
m4_define([b4_yyloc_default],
|
||||
[[
|
||||
# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
= { ]m4_join([, ],
|
||||
m4_defn([b4_location_initial_line]),
|
||||
m4_defn([b4_location_initial_column]),
|
||||
m4_defn([b4_location_initial_line]),
|
||||
m4_defn([b4_location_initial_column]))[ }
|
||||
# endif
|
||||
]])
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,345 @@
|
|||
# C++ GLR skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# This skeleton produces a C++ class that encapsulates a C glr parser.
|
||||
# This is in order to reduce the maintenance burden. The glr.c
|
||||
# skeleton is clean and pure enough so that there are no real
|
||||
# problems. The C++ interface is the same as that of lalr1.cc. In
|
||||
# fact, glr.c can replace yacc.c without the user noticing any
|
||||
# difference, and similarly for glr.cc replacing lalr1.cc.
|
||||
#
|
||||
# The passing of parse-params
|
||||
#
|
||||
# The additional arguments are stored as members of the parser
|
||||
# object, yyparser. The C routines need to carry yyparser
|
||||
# throughout the C parser; that's easy: make yyparser an
|
||||
# additional parse-param. But because the C++ skeleton needs to
|
||||
# know the "real" original parse-param, we save them
|
||||
# (b4_parse_param_orig). Note that b4_parse_param is overquoted
|
||||
# (and c.m4 strips one level of quotes). This is a PITA, and
|
||||
# explains why there are so many levels of quotes.
|
||||
#
|
||||
# The locations
|
||||
#
|
||||
# We use location.cc just like lalr1.cc, but because glr.c stores
|
||||
# the locations in a union, the position and location classes
|
||||
# must not have a constructor. Therefore, contrary to lalr1.cc, we
|
||||
# must not define "b4_location_constructors". As a consequence the
|
||||
# user must initialize the first positions (in particular the
|
||||
# filename member).
|
||||
|
||||
# We require a pure interface.
|
||||
m4_define([b4_pure_flag], [1])
|
||||
|
||||
m4_include(b4_pkgdatadir/[c++.m4])
|
||||
b4_bison_locations_if([m4_include(b4_pkgdatadir/[location.cc])])
|
||||
|
||||
m4_define([b4_parser_class_name],
|
||||
[b4_percent_define_get([[parser_class_name]])])
|
||||
|
||||
# Save the parse parameters.
|
||||
m4_define([b4_parse_param_orig], m4_defn([b4_parse_param]))
|
||||
|
||||
# b4_parse_param_wrap
|
||||
# -------------------
|
||||
# New ones.
|
||||
m4_ifset([b4_parse_param],
|
||||
[m4_define([b4_parse_param_wrap],
|
||||
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]],]
|
||||
m4_defn([b4_parse_param]))],
|
||||
[m4_define([b4_parse_param_wrap],
|
||||
[[b4_namespace_ref::b4_parser_class_name[& yyparser], [[yyparser]]]])
|
||||
])
|
||||
|
||||
|
||||
# b4_yy_symbol_print_define
|
||||
# -------------------------
|
||||
# Bypass the default implementation to generate the "yy_symbol_print"
|
||||
# and "yy_symbol_value_print" functions.
|
||||
m4_define([b4_yy_symbol_print_define],
|
||||
[[
|
||||
/*--------------------.
|
||||
| Print this symbol. |
|
||||
`--------------------*/
|
||||
|
||||
]b4_function_define([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *], []],
|
||||
[[int yytype], [yytype]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::semantic_type *yyvaluep],
|
||||
[yyvaluep]][]dnl
|
||||
b4_locations_if([,
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]]]),
|
||||
b4_parse_param)[
|
||||
{
|
||||
]b4_parse_param_use[]dnl
|
||||
[ yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[);
|
||||
}
|
||||
]])[
|
||||
|
||||
# Hijack the initial action to initialize the locations.
|
||||
]b4_bison_locations_if([m4_define([b4_initial_action],
|
||||
[yylloc.initialize ();]m4_ifdef([b4_initial_action], [
|
||||
m4_defn([b4_initial_action])]))])[
|
||||
|
||||
# Hijack the post prologue to insert early definition of YYLLOC_DEFAULT
|
||||
# and declaration of yyerror.
|
||||
]m4_append([b4_post_prologue],
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
]b4_yylloc_default_define[
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
|
||||
]b4_function_declare([yyerror],
|
||||
[static void],b4_locations_if([
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]],])
|
||||
b4_parse_param,
|
||||
[[const char* msg], [msg]])])
|
||||
|
||||
|
||||
#undef yynerrs
|
||||
#undef yychar
|
||||
#undef yylval]b4_locations_if([
|
||||
#undef yylloc])
|
||||
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[[/* Substitute the variable and function names. */
|
||||
#define yyparse ]b4_prefix[parse
|
||||
#define yylex ]b4_prefix[lex
|
||||
#define yyerror ]b4_prefix[error
|
||||
#define yydebug ]b4_prefix[debug
|
||||
]]b4_pure_if([], [[
|
||||
#define yylval ]b4_prefix[lval
|
||||
#define yychar ]b4_prefix[char
|
||||
#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[
|
||||
#define yylloc ]b4_prefix[lloc]])]))
|
||||
|
||||
# Hijack the epilogue to define implementations (yyerror, parser member
|
||||
# functions etc.).
|
||||
m4_append([b4_epilogue],
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
|
||||
/*------------------.
|
||||
| Report an error. |
|
||||
`------------------*/
|
||||
|
||||
]b4_function_define([yyerror],
|
||||
[static void],b4_locations_if([
|
||||
[[const ]b4_namespace_ref::b4_parser_class_name[::location_type *yylocationp],
|
||||
[yylocationp]],])
|
||||
b4_parse_param,
|
||||
[[const char* msg], [msg]])[
|
||||
{
|
||||
]b4_parse_param_use[]dnl
|
||||
[ yyparser.error (]b4_locations_if([[*yylocationp, ]])[msg);
|
||||
}
|
||||
|
||||
|
||||
]b4_namespace_open[
|
||||
]dnl In this section, the parse params are the original parse_params.
|
||||
m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
[ /// Build a parser object.
|
||||
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
||||
:])[
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
]m4_ifset([b4_parse_param], [ ], [ :])[yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
|
||||
#endif]b4_parse_param_cons[
|
||||
{
|
||||
}
|
||||
|
||||
]b4_parser_class_name::~b4_parser_class_name[ ()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
]b4_parser_class_name[::parse ()
|
||||
{
|
||||
return ::yyparse (*this]b4_user_args[);
|
||||
}
|
||||
|
||||
#if ]b4_api_PREFIX[DEBUG
|
||||
/*--------------------.
|
||||
| Print this symbol. |
|
||||
`--------------------*/
|
||||
|
||||
inline void
|
||||
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||
const location_type* yylocationp]])[)
|
||||
{]b4_locations_if([[
|
||||
YYUSE (yylocationp);]])[
|
||||
YYUSE (yyvaluep);
|
||||
std::ostream& yyoutput = debug_stream ();
|
||||
std::ostream& yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
]b4_symbol_actions([printer])[
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||
const location_type* yylocationp]])[)
|
||||
{
|
||||
*yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
|
||||
<< ' ' << yytname[yytype] << " ("]b4_locations_if([[
|
||||
<< *yylocationp << ": "]])[;
|
||||
yy_symbol_value_print_ (yytype, yyvaluep]b4_locations_if([[, yylocationp]])[);
|
||||
*yycdebug_ << ')';
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
]b4_parser_class_name[::debug_stream () const
|
||||
{
|
||||
return *yycdebug_;
|
||||
}
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::set_debug_stream (std::ostream& o)
|
||||
{
|
||||
yycdebug_ = &o;
|
||||
}
|
||||
|
||||
|
||||
]b4_parser_class_name[::debug_level_type
|
||||
]b4_parser_class_name[::debug_level () const
|
||||
{
|
||||
return yydebug;
|
||||
}
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::set_debug_level (debug_level_type l)
|
||||
{
|
||||
// Actually, it is yydebug which is really used.
|
||||
yydebug = l;
|
||||
}
|
||||
|
||||
#endif
|
||||
]m4_popdef([b4_parse_param])dnl
|
||||
b4_namespace_close
|
||||
])
|
||||
|
||||
# b4_shared_declarations
|
||||
# ----------------------
|
||||
# Declaration that might either go into the header (if --defines)
|
||||
# or open coded in the parser body.
|
||||
m4_define([b4_shared_declarations],
|
||||
[m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
b4_percent_code_get([[requires]])[
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <iostream>]b4_defines_if([
|
||||
b4_bison_locations_if([[#include "location.hh"]])])[
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
]b4_defines_if([],
|
||||
[b4_bison_locations_if([b4_position_define
|
||||
b4_location_define])])[
|
||||
|
||||
/// A Bison parser.
|
||||
class ]b4_parser_class_name[
|
||||
{
|
||||
public:
|
||||
]b4_public_types_declare[
|
||||
|
||||
/// Build a parser object.
|
||||
]b4_parser_class_name[ (]b4_parse_param_decl[);
|
||||
virtual ~]b4_parser_class_name[ ();
|
||||
|
||||
/// Parse.
|
||||
/// \returns 0 iff parsing succeeded.
|
||||
virtual int parse ();
|
||||
|
||||
/// The current debugging stream.
|
||||
std::ostream& debug_stream () const;
|
||||
/// Set the current debugging stream.
|
||||
void set_debug_stream (std::ostream &);
|
||||
|
||||
/// Type for debugging levels.
|
||||
typedef int debug_level_type;
|
||||
/// The current debugging level.
|
||||
debug_level_type debug_level () const;
|
||||
/// Set the current debugging level.
|
||||
void set_debug_level (debug_level_type l);
|
||||
|
||||
public:
|
||||
/// Report a syntax error.]b4_locations_if([[
|
||||
/// \param loc where the syntax error is found.]])[
|
||||
/// \param msg a description of the syntax error.
|
||||
virtual void error (]b4_locations_if([[const location_type& loc, ]])[const std::string& msg);
|
||||
|
||||
# if ]b4_api_PREFIX[DEBUG
|
||||
public:
|
||||
/// \brief Report a symbol value on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.]b4_locations_if([[
|
||||
/// \param yylocationp Its location.]])[
|
||||
virtual void yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||
const location_type* yylocationp]])[);
|
||||
/// \brief Report a symbol on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.]b4_locations_if([[
|
||||
/// \param yylocationp Its location.]])[
|
||||
virtual void yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep]b4_locations_if([[,
|
||||
const location_type* yylocationp]])[);
|
||||
private:
|
||||
// Debugging.
|
||||
std::ostream* yycdebug_;
|
||||
#endif
|
||||
|
||||
]b4_parse_param_vars[
|
||||
};
|
||||
|
||||
]dnl Redirections for glr.c.
|
||||
b4_percent_define_flag_if([[global_tokens_and_yystype]],
|
||||
[b4_token_defines])
|
||||
[
|
||||
#ifndef ]b4_api_PREFIX[STYPE
|
||||
# define ]b4_api_PREFIX[STYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
|
||||
#endif
|
||||
#ifndef ]b4_api_PREFIX[LTYPE
|
||||
# define ]b4_api_PREFIX[LTYPE ]b4_namespace_ref[::]b4_parser_class_name[::location_type
|
||||
#endif
|
||||
|
||||
]b4_namespace_close[
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]m4_popdef([b4_parse_param])dnl
|
||||
])
|
||||
|
||||
b4_defines_if(
|
||||
[b4_output_begin([b4_spec_defines_file])
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
[2002-2013])[
|
||||
|
||||
// C++ GLR parser skeleton written by Akim Demaille.
|
||||
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_shared_declarations[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]b4_output_end()])
|
||||
|
||||
# Let glr.c (and b4_shared_declarations) believe that the user
|
||||
# arguments include the parser itself.
|
||||
m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_wrap]))
|
||||
m4_include(b4_pkgdatadir/[glr.c])
|
||||
m4_popdef([b4_parse_param])
|
|
@ -0,0 +1,26 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# Java skeleton dispatching for Bison.
|
||||
|
||||
# Copyright (C) 2007, 2009-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
b4_glr_if( [b4_complain([%%glr-parser not supported for Java])])
|
||||
b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])])
|
||||
|
||||
m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.java]])
|
||||
m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
|
||||
|
||||
m4_include(b4_used_skeleton)
|
|
@ -0,0 +1,342 @@
|
|||
-*- Autoconf -*-
|
||||
|
||||
# Java language support for Bison
|
||||
|
||||
# Copyright (C) 2007-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_include(b4_pkgdatadir/[c-like.m4])
|
||||
|
||||
|
||||
# b4_list2(LIST1, LIST2)
|
||||
# ----------------------
|
||||
# Join two lists with a comma if necessary.
|
||||
m4_define([b4_list2],
|
||||
[$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2])
|
||||
|
||||
|
||||
# b4_percent_define_get3(DEF, PRE, POST, NOT)
|
||||
# -------------------------------------------
|
||||
# Expand to the value of DEF surrounded by PRE and POST if it's %define'ed,
|
||||
# otherwise NOT.
|
||||
m4_define([b4_percent_define_get3],
|
||||
[m4_ifval(m4_quote(b4_percent_define_get([$1])),
|
||||
[$2[]b4_percent_define_get([$1])[]$3], [$4])])
|
||||
|
||||
|
||||
|
||||
# b4_flag_value(BOOLEAN-FLAG)
|
||||
# ---------------------------
|
||||
m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])])
|
||||
|
||||
|
||||
# b4_public_if(TRUE, FALSE)
|
||||
# -------------------------
|
||||
b4_percent_define_default([[public]], [[false]])
|
||||
m4_define([b4_public_if],
|
||||
[b4_percent_define_flag_if([public], [$1], [$2])])
|
||||
|
||||
|
||||
# b4_abstract_if(TRUE, FALSE)
|
||||
# ---------------------------
|
||||
b4_percent_define_default([[abstract]], [[false]])
|
||||
m4_define([b4_abstract_if],
|
||||
[b4_percent_define_flag_if([abstract], [$1], [$2])])
|
||||
|
||||
|
||||
# b4_final_if(TRUE, FALSE)
|
||||
# ---------------------------
|
||||
b4_percent_define_default([[final]], [[false]])
|
||||
m4_define([b4_final_if],
|
||||
[b4_percent_define_flag_if([final], [$1], [$2])])
|
||||
|
||||
|
||||
# b4_strictfp_if(TRUE, FALSE)
|
||||
# ---------------------------
|
||||
b4_percent_define_default([[strictfp]], [[false]])
|
||||
m4_define([b4_strictfp_if],
|
||||
[b4_percent_define_flag_if([strictfp], [$1], [$2])])
|
||||
|
||||
|
||||
# b4_lexer_if(TRUE, FALSE)
|
||||
# ------------------------
|
||||
m4_define([b4_lexer_if],
|
||||
[b4_percent_code_ifdef([[lexer]], [$1], [$2])])
|
||||
|
||||
|
||||
# b4_identification
|
||||
# -----------------
|
||||
m4_define([b4_identification],
|
||||
[ /** Version number for the Bison executable that generated this parser. */
|
||||
public static final String bisonVersion = "b4_version";
|
||||
|
||||
/** Name of the skeleton that generated this parser. */
|
||||
public static final String bisonSkeleton = b4_skeleton;
|
||||
])
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## Data types. ##
|
||||
## ------------ ##
|
||||
|
||||
# b4_int_type(MIN, MAX)
|
||||
# ---------------------
|
||||
# Return the smallest int type able to handle numbers ranging from
|
||||
# MIN to MAX (included).
|
||||
m4_define([b4_int_type],
|
||||
[m4_if(b4_ints_in($@, [-128], [127]), [1], [byte],
|
||||
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
||||
[int])])
|
||||
|
||||
# b4_int_type_for(NAME)
|
||||
# ---------------------
|
||||
# Return the smallest int type able to handle numbers ranging from
|
||||
# 'NAME_min' to 'NAME_max' (included).
|
||||
m4_define([b4_int_type_for],
|
||||
[b4_int_type($1_min, $1_max)])
|
||||
|
||||
# b4_null
|
||||
# -------
|
||||
m4_define([b4_null], [null])
|
||||
|
||||
|
||||
# b4_typed_parser_table_define(TYPE, NAME, DATA, COMMENT)
|
||||
# -------------------------------------------------------
|
||||
m4_define([b4_typed_parser_table_define],
|
||||
[m4_ifval([$4], [b4_comment([$4])
|
||||
])dnl
|
||||
[private static final ]$1[ yy$2_[] = yy$2_init();
|
||||
private static final ]$1[[] yy$2_init()
|
||||
{
|
||||
return new ]$1[[]
|
||||
{
|
||||
]$3[
|
||||
};
|
||||
}]])
|
||||
|
||||
|
||||
# b4_integral_parser_table_define(NAME, DATA, COMMENT)
|
||||
#-----------------------------------------------------
|
||||
m4_define([b4_integral_parser_table_define],
|
||||
[b4_typed_parser_table_define([b4_int_type_for([$2])], [$1], [$2], [$3])])
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Assigning token numbers. ##
|
||||
## ------------------------- ##
|
||||
|
||||
# b4_token_enum(TOKEN-NUM)
|
||||
# ------------------------
|
||||
# Output the definition of this token as an enum.
|
||||
m4_define([b4_token_enum],
|
||||
[b4_token_format([ /** Token number, to be returned by the scanner. */
|
||||
static final int %s = %s;
|
||||
], [$1])])
|
||||
|
||||
# b4_token_enums
|
||||
# --------------
|
||||
# Output the definition of the tokens (if there are) as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[b4_any_token_visible_if([/* Tokens. */
|
||||
b4_symbol_foreach([b4_token_enum])])])
|
||||
|
||||
# b4-case(ID, CODE)
|
||||
# -----------------
|
||||
# We need to fool Java's stupid unreachable code detection.
|
||||
m4_define([b4_case], [ case $1:
|
||||
if (yyn == $1)
|
||||
$2;
|
||||
break;
|
||||
])
|
||||
|
||||
# b4_predicate_case(LABEL, CONDITIONS)
|
||||
# ------------------------------------
|
||||
m4_define([b4_predicate_case], [ case $1:
|
||||
if (! ($2)) YYERROR;
|
||||
break;
|
||||
])
|
||||
|
||||
|
||||
## -------- ##
|
||||
## Checks. ##
|
||||
## -------- ##
|
||||
|
||||
b4_percent_define_check_kind([[api.value.type]], [code], [deprecated])
|
||||
|
||||
b4_percent_define_check_kind([[annotations]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[extends]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[implements]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[init_throws]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[lex_throws]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[parser_class_name]], [code], [deprecated])
|
||||
b4_percent_define_check_kind([[throws]], [code], [deprecated])
|
||||
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Default values. ##
|
||||
## ---------------- ##
|
||||
|
||||
m4_define([b4_yystype], [b4_percent_define_get([[api.value.type]])])
|
||||
b4_percent_define_default([[api.value.type]], [[Object]])
|
||||
|
||||
# %name-prefix
|
||||
m4_define_default([b4_prefix], [[YY]])
|
||||
|
||||
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])
|
||||
m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
|
||||
|
||||
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])
|
||||
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
|
||||
|
||||
b4_percent_define_default([[throws]], [])
|
||||
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
|
||||
|
||||
b4_percent_define_default([[init_throws]], [])
|
||||
m4_define([b4_init_throws], [b4_percent_define_get([[init_throws]])])
|
||||
|
||||
b4_percent_define_default([[api.location.type]], [Location])
|
||||
m4_define([b4_location_type], [b4_percent_define_get([[api.location.type]])])
|
||||
|
||||
b4_percent_define_default([[api.position.type]], [Position])
|
||||
m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Semantic Values. ##
|
||||
## ----------------- ##
|
||||
|
||||
|
||||
# b4_lhs_value([TYPE])
|
||||
# --------------------
|
||||
# Expansion of $<TYPE>$.
|
||||
m4_define([b4_lhs_value], [yyval])
|
||||
|
||||
|
||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||
# --------------------------------------
|
||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||
# symbols on RHS.
|
||||
#
|
||||
# In this simple implementation, %token and %type have class names
|
||||
# between the angle brackets.
|
||||
m4_define([b4_rhs_value],
|
||||
[(m4_ifval($3, [($3)])[](yystack.valueAt ($1-($2))))])
|
||||
|
||||
# b4_lhs_location()
|
||||
# -----------------
|
||||
# Expansion of @$.
|
||||
m4_define([b4_lhs_location],
|
||||
[(yyloc)])
|
||||
|
||||
|
||||
# b4_rhs_location(RULE-LENGTH, NUM)
|
||||
# ---------------------------------
|
||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||
# on RHS.
|
||||
m4_define([b4_rhs_location],
|
||||
[yystack.locationAt ($1-($2))])
|
||||
|
||||
|
||||
# b4_lex_param
|
||||
# b4_parse_param
|
||||
# --------------
|
||||
# If defined, b4_lex_param arrives double quoted, but below we prefer
|
||||
# it to be single quoted. Same for b4_parse_param.
|
||||
|
||||
# TODO: should be in bison.m4
|
||||
m4_define_default([b4_lex_param], [[]])
|
||||
m4_define([b4_lex_param], b4_lex_param)
|
||||
m4_define([b4_parse_param], b4_parse_param)
|
||||
|
||||
# b4_lex_param_decl
|
||||
# -----------------
|
||||
# Extra formal arguments of the constructor.
|
||||
m4_define([b4_lex_param_decl],
|
||||
[m4_ifset([b4_lex_param],
|
||||
[b4_remove_comma([$1],
|
||||
b4_param_decls(b4_lex_param))],
|
||||
[$1])])
|
||||
|
||||
m4_define([b4_param_decls],
|
||||
[m4_map([b4_param_decl], [$@])])
|
||||
m4_define([b4_param_decl], [, $1])
|
||||
|
||||
m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)])
|
||||
|
||||
|
||||
|
||||
# b4_parse_param_decl
|
||||
# -------------------
|
||||
# Extra formal arguments of the constructor.
|
||||
m4_define([b4_parse_param_decl],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[b4_remove_comma([$1],
|
||||
b4_param_decls(b4_parse_param))],
|
||||
[$1])])
|
||||
|
||||
|
||||
|
||||
# b4_lex_param_call
|
||||
# -----------------
|
||||
# Delegating the lexer parameters to the lexer constructor.
|
||||
m4_define([b4_lex_param_call],
|
||||
[m4_ifset([b4_lex_param],
|
||||
[b4_remove_comma([$1],
|
||||
b4_param_calls(b4_lex_param))],
|
||||
[$1])])
|
||||
m4_define([b4_param_calls],
|
||||
[m4_map([b4_param_call], [$@])])
|
||||
m4_define([b4_param_call], [, $2])
|
||||
|
||||
|
||||
|
||||
# b4_parse_param_cons
|
||||
# -------------------
|
||||
# Extra initialisations of the constructor.
|
||||
m4_define([b4_parse_param_cons],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[b4_constructor_calls(b4_parse_param)])])
|
||||
|
||||
m4_define([b4_constructor_calls],
|
||||
[m4_map([b4_constructor_call], [$@])])
|
||||
m4_define([b4_constructor_call],
|
||||
[this.$2 = $2;
|
||||
])
|
||||
|
||||
|
||||
|
||||
# b4_parse_param_vars
|
||||
# -------------------
|
||||
# Extra instance variables.
|
||||
m4_define([b4_parse_param_vars],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
/* User arguments. */
|
||||
b4_var_decls(b4_parse_param)])])
|
||||
|
||||
m4_define([b4_var_decls],
|
||||
[m4_map_sep([b4_var_decl], [
|
||||
], [$@])])
|
||||
m4_define([b4_var_decl],
|
||||
[ protected final $1;])
|
||||
|
||||
|
||||
|
||||
# b4_maybe_throws(THROWS)
|
||||
# -----------------------
|
||||
# Expand to either an empty string or "throws THROWS".
|
||||
m4_define([b4_maybe_throws],
|
||||
[m4_ifval($1, [throws $1])])
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,45 @@
|
|||
## Copyright (C) 2002, 2005-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
data/README \
|
||||
data/bison.m4 \
|
||||
data/c++-skel.m4 \
|
||||
data/c++.m4 \
|
||||
data/c-like.m4 \
|
||||
data/c-skel.m4 \
|
||||
data/c.m4 \
|
||||
data/glr.c \
|
||||
data/glr.cc \
|
||||
data/java-skel.m4 \
|
||||
data/java.m4 \
|
||||
data/lalr1.cc \
|
||||
data/lalr1.java \
|
||||
data/location.cc \
|
||||
data/stack.hh \
|
||||
data/variant.hh \
|
||||
data/yacc.c
|
||||
|
||||
m4sugardir = $(pkgdatadir)/m4sugar
|
||||
dist_m4sugar_DATA = \
|
||||
data/m4sugar/foreach.m4 \
|
||||
data/m4sugar/m4sugar.m4
|
||||
|
||||
xsltdir = $(pkgdatadir)/xslt
|
||||
dist_xslt_DATA = \
|
||||
data/xslt/bison.xsl \
|
||||
data/xslt/xml2dot.xsl \
|
||||
data/xslt/xml2text.xsl \
|
||||
data/xslt/xml2xhtml.xsl
|
|
@ -0,0 +1,335 @@
|
|||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_pushdef([b4_copyright_years],
|
||||
[2002-2013])
|
||||
|
||||
# b4_position_define
|
||||
# ------------------
|
||||
# Define class position.
|
||||
m4_define([b4_position_define],
|
||||
[[ /// Abstract a position.
|
||||
class position
|
||||
{
|
||||
public:]m4_ifdef([b4_location_constructors], [[
|
||||
/// Construct a position.
|
||||
explicit position (]b4_percent_define_get([[filename_type]])[* f = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
: filename (f)
|
||||
, line (l)
|
||||
, column (c)
|
||||
{
|
||||
}
|
||||
|
||||
]])[
|
||||
/// Initialization.
|
||||
void initialize (]b4_percent_define_get([[filename_type]])[* fn = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
{
|
||||
filename = fn;
|
||||
line = l;
|
||||
column = c;
|
||||
}
|
||||
|
||||
/** \name Line and Column related manipulators
|
||||
** \{ */
|
||||
/// (line related) Advance to the COUNT next lines.
|
||||
void lines (int count = 1)
|
||||
{
|
||||
if (count)
|
||||
{
|
||||
column = ]b4_location_initial_column[u;
|
||||
line = add_ (line, count, ]b4_location_initial_line[);
|
||||
}
|
||||
}
|
||||
|
||||
/// (column related) Advance to the COUNT next columns.
|
||||
void columns (int count = 1)
|
||||
{
|
||||
column = add_ (column, count, ]b4_location_initial_column[);
|
||||
}
|
||||
/** \} */
|
||||
|
||||
/// File name to which this position refers.
|
||||
]b4_percent_define_get([[filename_type]])[* filename;
|
||||
/// Current line number.
|
||||
unsigned int line;
|
||||
/// Current column number.
|
||||
unsigned int column;
|
||||
|
||||
private:
|
||||
/// Compute max(min, lhs+rhs) (provided min <= lhs).
|
||||
static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
|
||||
{
|
||||
return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
|
||||
? rhs + lhs
|
||||
: min);
|
||||
}
|
||||
};
|
||||
|
||||
/// Add and assign a position.
|
||||
inline position&
|
||||
operator+= (position& res, int width)
|
||||
{
|
||||
res.columns (width);
|
||||
return res;
|
||||
}
|
||||
|
||||
/// Add two position objects.
|
||||
inline position
|
||||
operator+ (position res, int width)
|
||||
{
|
||||
return res += width;
|
||||
}
|
||||
|
||||
/// Add and assign a position.
|
||||
inline position&
|
||||
operator-= (position& res, int width)
|
||||
{
|
||||
return res += -width;
|
||||
}
|
||||
|
||||
/// Add two position objects.
|
||||
inline position
|
||||
operator- (position res, int width)
|
||||
{
|
||||
return res -= width;
|
||||
}
|
||||
]b4_percent_define_flag_if([[define_location_comparison]], [[
|
||||
/// Compare two position objects.
|
||||
inline bool
|
||||
operator== (const position& pos1, const position& pos2)
|
||||
{
|
||||
return (pos1.line == pos2.line
|
||||
&& pos1.column == pos2.column
|
||||
&& (pos1.filename == pos2.filename
|
||||
|| (pos1.filename && pos2.filename
|
||||
&& *pos1.filename == *pos2.filename)));
|
||||
}
|
||||
|
||||
/// Compare two position objects.
|
||||
inline bool
|
||||
operator!= (const position& pos1, const position& pos2)
|
||||
{
|
||||
return !(pos1 == pos2);
|
||||
}
|
||||
]])[
|
||||
/** \brief Intercept output stream redirection.
|
||||
** \param ostr the destination output stream
|
||||
** \param pos a reference to the position to redirect
|
||||
*/
|
||||
template <typename YYChar>
|
||||
inline std::basic_ostream<YYChar>&
|
||||
operator<< (std::basic_ostream<YYChar>& ostr, const position& pos)
|
||||
{
|
||||
if (pos.filename)
|
||||
ostr << *pos.filename << ':';
|
||||
return ostr << pos.line << '.' << pos.column;
|
||||
}
|
||||
]])
|
||||
|
||||
|
||||
# b4_location_define
|
||||
# ------------------
|
||||
m4_define([b4_location_define],
|
||||
[[ /// Abstract a location.
|
||||
class location
|
||||
{
|
||||
public:
|
||||
]m4_ifdef([b4_location_constructors], [
|
||||
/// Construct a location from \a b to \a e.
|
||||
location (const position& b, const position& e)
|
||||
: begin (b)
|
||||
, end (e)
|
||||
{
|
||||
}
|
||||
|
||||
/// Construct a 0-width location in \a p.
|
||||
explicit location (const position& p = position ())
|
||||
: begin (p)
|
||||
, end (p)
|
||||
{
|
||||
}
|
||||
|
||||
/// Construct a 0-width location in \a f, \a l, \a c.
|
||||
explicit location (]b4_percent_define_get([[filename_type]])[* f,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
: begin (f, l, c)
|
||||
, end (f, l, c)
|
||||
{
|
||||
}
|
||||
|
||||
])[
|
||||
/// Initialization.
|
||||
void initialize (]b4_percent_define_get([[filename_type]])[* f = YY_NULL,
|
||||
unsigned int l = ]b4_location_initial_line[u,
|
||||
unsigned int c = ]b4_location_initial_column[u)
|
||||
{
|
||||
begin.initialize (f, l, c);
|
||||
end = begin;
|
||||
}
|
||||
|
||||
/** \name Line and Column related manipulators
|
||||
** \{ */
|
||||
public:
|
||||
/// Reset initial location to final location.
|
||||
void step ()
|
||||
{
|
||||
begin = end;
|
||||
}
|
||||
|
||||
/// Extend the current location to the COUNT next columns.
|
||||
void columns (int count = 1)
|
||||
{
|
||||
end += count;
|
||||
}
|
||||
|
||||
/// Extend the current location to the COUNT next lines.
|
||||
void lines (int count = 1)
|
||||
{
|
||||
end.lines (count);
|
||||
}
|
||||
/** \} */
|
||||
|
||||
|
||||
public:
|
||||
/// Beginning of the located region.
|
||||
position begin;
|
||||
/// End of the located region.
|
||||
position end;
|
||||
};
|
||||
|
||||
/// Join two location objects to create a location.
|
||||
inline location operator+ (location res, const location& end)
|
||||
{
|
||||
res.end = end.end;
|
||||
return res;
|
||||
}
|
||||
|
||||
/// Change end position in place.
|
||||
inline location& operator+= (location& res, int width)
|
||||
{
|
||||
res.columns (width);
|
||||
return res;
|
||||
}
|
||||
|
||||
/// Change end position.
|
||||
inline location operator+ (location res, int width)
|
||||
{
|
||||
return res += width;
|
||||
}
|
||||
|
||||
/// Change end position in place.
|
||||
inline location& operator-= (location& res, int width)
|
||||
{
|
||||
return res += -width;
|
||||
}
|
||||
|
||||
/// Change end position.
|
||||
inline location operator- (const location& begin, int width)
|
||||
{
|
||||
return begin + -width;
|
||||
}
|
||||
]b4_percent_define_flag_if([[define_location_comparison]], [[
|
||||
/// Compare two location objects.
|
||||
inline bool
|
||||
operator== (const location& loc1, const location& loc2)
|
||||
{
|
||||
return loc1.begin == loc2.begin && loc1.end == loc2.end;
|
||||
}
|
||||
|
||||
/// Compare two location objects.
|
||||
inline bool
|
||||
operator!= (const location& loc1, const location& loc2)
|
||||
{
|
||||
return !(loc1 == loc2);
|
||||
}
|
||||
]])[
|
||||
/** \brief Intercept output stream redirection.
|
||||
** \param ostr the destination output stream
|
||||
** \param loc a reference to the location to redirect
|
||||
**
|
||||
** Avoid duplicate information.
|
||||
*/
|
||||
template <typename YYChar>
|
||||
inline std::basic_ostream<YYChar>&
|
||||
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
|
||||
{
|
||||
unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
|
||||
ostr << loc.begin// << "(" << loc.end << ") "
|
||||
;
|
||||
if (loc.end.filename
|
||||
&& (!loc.begin.filename
|
||||
|| *loc.begin.filename != *loc.end.filename))
|
||||
ostr << '-' << loc.end.filename << ':' << loc.end.line << '.' << end_col;
|
||||
else if (loc.begin.line < loc.end.line)
|
||||
ostr << '-' << loc.end.line << '.' << end_col;
|
||||
else if (loc.begin.column < end_col)
|
||||
ostr << '-' << end_col;
|
||||
return ostr;
|
||||
}
|
||||
]])
|
||||
|
||||
|
||||
b4_defines_if([
|
||||
b4_output_begin([b4_dir_prefix[]position.hh])
|
||||
b4_copyright([Positions for Bison parsers in C++])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[position.hh
|
||||
** Define the ]b4_namespace_ref[::position class.
|
||||
*/
|
||||
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
|
||||
|
||||
# include <algorithm> // std::max
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
|
||||
]b4_null_define[
|
||||
|
||||
]b4_namespace_open[
|
||||
]b4_position_define[
|
||||
]b4_namespace_close[
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]position.hh])
|
||||
b4_output_end()
|
||||
|
||||
|
||||
b4_output_begin([b4_dir_prefix[]location.hh])
|
||||
b4_copyright([Locations for Bison parsers in C++])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[location.hh
|
||||
** Define the ]b4_namespace_ref[::location class.
|
||||
*/
|
||||
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[
|
||||
|
||||
# include "position.hh"
|
||||
|
||||
]b4_namespace_open[
|
||||
]b4_location_define[
|
||||
]b4_namespace_close[
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]location.hh])
|
||||
b4_output_end()
|
||||
])
|
||||
|
||||
|
||||
m4_popdef([b4_copyright_years])
|
|
@ -0,0 +1,362 @@
|
|||
# -*- Autoconf -*-
|
||||
# This file is part of Autoconf.
|
||||
# foreach-based replacements for recursive functions.
|
||||
# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes
|
||||
# GNU M4 1.6 by requiring more memory and macro expansions.
|
||||
#
|
||||
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of Autoconf. 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.
|
||||
#
|
||||
# Under Section 7 of GPL version 3, you are granted additional
|
||||
# permissions described in the Autoconf Configure Script Exception,
|
||||
# version 3.0, as published by the Free Software Foundation.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# and a copy of the Autoconf Configure Script Exception along with
|
||||
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
|
||||
# respectively. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Eric Blake.
|
||||
|
||||
# In M4 1.4.x, every byte of $@ is rescanned. This means that an
|
||||
# algorithm on n arguments that recurses with one less argument each
|
||||
# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In
|
||||
# M4 1.6, this was fixed so that $@ is only scanned once, then
|
||||
# back-references are made to information stored about the scan.
|
||||
# Thus, n iterations need only scan n arguments, for O(n) time.
|
||||
# Additionally, in M4 1.4.x, recursive algorithms did not clean up
|
||||
# memory very well, requiring O(n^2) memory rather than O(n) for n
|
||||
# iterations.
|
||||
#
|
||||
# This file is designed to overcome the quadratic nature of $@
|
||||
# recursion by writing a variant of m4_foreach that uses m4_for rather
|
||||
# than $@ recursion to operate on the list. This involves more macro
|
||||
# expansions, but avoids the need to rescan a quadratic number of
|
||||
# arguments, making these replacements very attractive for M4 1.4.x.
|
||||
# On the other hand, in any version of M4, expanding additional macros
|
||||
# costs additional time; therefore, in M4 1.6, where $@ recursion uses
|
||||
# fewer macros, these replacements actually pessimize performance.
|
||||
# Additionally, the use of $10 to mean the tenth argument violates
|
||||
# POSIX; although all versions of m4 1.4.x support this meaning, a
|
||||
# future m4 version may switch to take it as the first argument
|
||||
# concatenated with a literal 0, so the implementations in this file
|
||||
# are not future-proof. Thus, this file is conditionally included as
|
||||
# part of m4_init(), only when it is detected that M4 probably has
|
||||
# quadratic behavior (ie. it lacks the macro __m4_version__).
|
||||
#
|
||||
# Please keep this file in sync with m4sugar.m4.
|
||||
|
||||
# _m4_foreach(PRE, POST, IGNORED, ARG...)
|
||||
# ---------------------------------------
|
||||
# Form the common basis of the m4_foreach and m4_map macros. For each
|
||||
# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion
|
||||
# easier, and must be supplied rather than implicit.
|
||||
#
|
||||
# This version minimizes the number of times that $@ is evaluated by
|
||||
# using m4_for to generate a boilerplate into _m4_f then passing $@ to
|
||||
# that temporary macro. Thus, the recursion is done in m4_for without
|
||||
# reparsing any user input, and is not quadratic. For an idea of how
|
||||
# this works, note that m4_foreach(i,[1,2],[i]) calls
|
||||
# _m4_foreach([m4_define([i],],[)i],[],[1],[2])
|
||||
# which defines _m4_f:
|
||||
# $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f])
|
||||
# then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result:
|
||||
# m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]).
|
||||
m4_define([_m4_foreach],
|
||||
[m4_if([$#], [3], [],
|
||||
[m4_pushdef([_m4_f], _m4_for([4], [$#], [1],
|
||||
[$0_([1], [2],], [)])[_m4_popdef([_m4_f])])_m4_f($@)])])
|
||||
|
||||
m4_define([_m4_foreach_],
|
||||
[[$$1[$$3]$$2[]]])
|
||||
|
||||
# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
|
||||
# -----------------------------------------------------------
|
||||
# Find the first VAL that SWITCH matches, and expand the corresponding
|
||||
# IF-VAL. If there are no matches, expand DEFAULT.
|
||||
#
|
||||
# Use m4_for to create a temporary macro in terms of a boilerplate
|
||||
# m4_if with final cleanup. If $# is even, we have DEFAULT; if it is
|
||||
# odd, then rounding the last $# up in the temporary macro is
|
||||
# harmless. For example, both m4_case(1,2,3,4,5) and
|
||||
# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being
|
||||
# m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6])
|
||||
m4_define([m4_case],
|
||||
[m4_if(m4_eval([$# <= 2]), [1], [$2],
|
||||
[m4_pushdef([_$0], [m4_if(]_m4_for([2], m4_eval([($# - 1) / 2 * 2]), [2],
|
||||
[_$0_(], [)])[_m4_popdef(
|
||||
[_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])])
|
||||
|
||||
m4_define([_m4_case_],
|
||||
[$0_([1], [$1], m4_incr([$1]))])
|
||||
|
||||
m4_define([_m4_case__],
|
||||
[[[$$1],[$$2],[$$3],]])
|
||||
|
||||
# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
|
||||
# -----------------------------------------------------
|
||||
# m4 equivalent of
|
||||
#
|
||||
# if (SWITCH =~ RE1)
|
||||
# VAL1;
|
||||
# elif (SWITCH =~ RE2)
|
||||
# VAL2;
|
||||
# elif ...
|
||||
# ...
|
||||
# else
|
||||
# DEFAULT
|
||||
#
|
||||
# We build the temporary macro _m4_b:
|
||||
# m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])...
|
||||
# _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b]))
|
||||
# then invoke m4_unquote(_m4_b($@)), for concatenation with later text.
|
||||
m4_define([m4_bmatch],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
|
||||
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
|
||||
[$#], 2, [$2],
|
||||
[m4_pushdef([_m4_b], [m4_define([_m4_b],
|
||||
_m4_defn([_$0]))]_m4_for([3], m4_eval([($# + 1) / 2 * 2 - 1]),
|
||||
[2], [_$0_(], [)])[_m4_b([], [],]m4_dquote([$]m4_eval(
|
||||
[($# + 1) / 2 * 2]))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])])
|
||||
|
||||
m4_define([_m4_bmatch],
|
||||
[m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])])
|
||||
|
||||
m4_define([_m4_bmatch_],
|
||||
[$0_([1], m4_decr([$1]), [$1])])
|
||||
|
||||
m4_define([_m4_bmatch__],
|
||||
[[_m4_b([$$1], [$$2], [$$3])]])
|
||||
|
||||
|
||||
# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
|
||||
# -------------------------------------------------------------------
|
||||
# Similar to m4_if, except that each TEST is expanded when encountered.
|
||||
# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
|
||||
# The result is DEFAULT if no tests passed. This macro allows
|
||||
# short-circuiting of expensive tests, where it pays to arrange quick
|
||||
# filter tests to run first.
|
||||
#
|
||||
# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n.
|
||||
# We only have to speed up _m4_cond, by building the temporary _m4_c:
|
||||
# m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)],
|
||||
# [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)],
|
||||
# [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)],
|
||||
# [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c]))
|
||||
# We invoke m4_unquote(_m4_c($@)), for concatenation with later text.
|
||||
m4_define([_m4_cond],
|
||||
[m4_pushdef([_m4_c], [m4_define([_m4_c],
|
||||
_m4_defn([m4_unquote]))]_m4_for([2], m4_eval([$# / 3 * 3 - 1]), [3],
|
||||
[$0_(], [)])[_m4_c(]m4_dquote(m4_dquote(
|
||||
[$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))])
|
||||
|
||||
m4_define([_m4_cond_],
|
||||
[$0_(m4_decr([$1]), [$1], m4_incr([$1]))])
|
||||
|
||||
m4_define([_m4_cond__],
|
||||
[[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]])
|
||||
|
||||
# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
|
||||
# ----------------------------------------------------
|
||||
# m4 equivalent of
|
||||
#
|
||||
# $_ = STRING;
|
||||
# s/RE1/SUBST1/g;
|
||||
# s/RE2/SUBST2/g;
|
||||
# ...
|
||||
#
|
||||
# m4_bpatsubsts already validated an odd number of arguments; we only
|
||||
# need to speed up _m4_bpatsubsts. To avoid nesting, we build the
|
||||
# temporary _m4_p:
|
||||
# m4_define([_m4_p], [$1])m4_define([_m4_p],
|
||||
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p],
|
||||
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],...
|
||||
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote(
|
||||
# _m4_defn([_m4_p])_m4_popdef([_m4_p]))
|
||||
m4_define([_m4_bpatsubsts],
|
||||
[m4_pushdef([_m4_p], [m4_define([_m4_p],
|
||||
]m4_dquote([$]1)[)]_m4_for([3], [$#], [2], [$0_(],
|
||||
[)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)])
|
||||
|
||||
m4_define([_m4_bpatsubsts_],
|
||||
[$0_(m4_decr([$1]), [$1])])
|
||||
|
||||
m4_define([_m4_bpatsubsts__],
|
||||
[[m4_define([_m4_p],
|
||||
m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]])
|
||||
|
||||
# m4_shiftn(N, ...)
|
||||
# -----------------
|
||||
# Returns ... shifted N times. Useful for recursive "varargs" constructs.
|
||||
#
|
||||
# m4_shiftn already validated arguments; we only need to speed up
|
||||
# _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as
|
||||
# ,[$5],[$6],...,[$m]_m4_popdef([_m4_s])
|
||||
# before calling m4_shift(_m4_s($@)).
|
||||
m4_define([_m4_shiftn],
|
||||
[m4_if(m4_incr([$1]), [$#], [], [m4_pushdef([_m4_s],
|
||||
_m4_for(m4_eval([$1 + 2]), [$#], [1],
|
||||
[[,]m4_dquote($], [)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])])
|
||||
|
||||
# m4_do(STRING, ...)
|
||||
# ------------------
|
||||
# This macro invokes all its arguments (in sequence, of course). It is
|
||||
# useful for making your macros more structured and readable by dropping
|
||||
# unnecessary dnl's and have the macros indented properly.
|
||||
#
|
||||
# Here, we use the temporary macro _m4_do, defined as
|
||||
# $1[]$2[]...[]$n[]_m4_popdef([_m4_do])
|
||||
m4_define([m4_do],
|
||||
[m4_if([$#], [0], [],
|
||||
[m4_pushdef([_$0], _m4_for([1], [$#], [1],
|
||||
[$], [[[]]])[_m4_popdef([_$0])])_$0($@)])])
|
||||
|
||||
# m4_dquote_elt(ARGS)
|
||||
# -------------------
|
||||
# Return ARGS as an unquoted list of double-quoted arguments.
|
||||
#
|
||||
# _m4_foreach to the rescue.
|
||||
m4_define([m4_dquote_elt],
|
||||
[m4_if([$#], [0], [], [[[$1]]_m4_foreach([,m4_dquote(], [)], $@)])])
|
||||
|
||||
# m4_reverse(ARGS)
|
||||
# ----------------
|
||||
# Output ARGS in reverse order.
|
||||
#
|
||||
# Invoke _m4_r($@) with the temporary _m4_r built as
|
||||
# [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r])
|
||||
m4_define([m4_reverse],
|
||||
[m4_if([$#], [0], [], [$#], [1], [[$1]],
|
||||
[m4_pushdef([_m4_r], [[$$#]]_m4_for(m4_decr([$#]), [1], [-1],
|
||||
[[, ]m4_dquote($], [)])[_m4_popdef([_m4_r])])_m4_r($@)])])
|
||||
|
||||
|
||||
# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
|
||||
# -------------------------------------------------------------
|
||||
# Perform a pairwise grouping of consecutive ARGs, by expanding
|
||||
# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the
|
||||
# final argument is expanded with END-EXPR([ARGn]).
|
||||
#
|
||||
# Build the temporary macro _m4_map_args_pair, with the $2([$m+1])
|
||||
# only output if $# is odd:
|
||||
# $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1],
|
||||
# [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair])
|
||||
m4_define([m4_map_args_pair],
|
||||
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
|
||||
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
|
||||
[$#], [2], [],
|
||||
[$#], [3], [m4_default([$2], [$1])([$3])[]],
|
||||
[m4_pushdef([_$0], _m4_for([3],
|
||||
m4_eval([$# / 2 * 2 - 1]), [2], [_$0_(], [)])_$0_end(
|
||||
[1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])])
|
||||
|
||||
m4_define([_m4_map_args_pair_],
|
||||
[$0_([1], [$1], m4_incr([$1]))])
|
||||
|
||||
m4_define([_m4_map_args_pair__],
|
||||
[[$$1([$$2], [$$3])[]]])
|
||||
|
||||
m4_define([_m4_map_args_pair_end],
|
||||
[m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])])
|
||||
|
||||
# m4_join(SEP, ARG1, ARG2...)
|
||||
# ---------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG
|
||||
# is the empty string. No expansion is performed on SEP or ARGs.
|
||||
#
|
||||
# Use a self-modifying separator, since we don't know how many
|
||||
# arguments might be skipped before a separator is first printed, but
|
||||
# be careful if the separator contains $. _m4_foreach to the rescue.
|
||||
m4_define([m4_join],
|
||||
[m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl
|
||||
[_m4_foreach([_$0([$1],], [)], $@)_m4_popdef([_m4_sep])])
|
||||
|
||||
m4_define([_m4_join],
|
||||
[m4_if([$2], [], [], [_m4_sep([$1])[$2]])])
|
||||
|
||||
# m4_joinall(SEP, ARG1, ARG2...)
|
||||
# ------------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP.
|
||||
# No expansion is performed on SEP or ARGs.
|
||||
#
|
||||
# A bit easier than m4_join. _m4_foreach to the rescue.
|
||||
m4_define([m4_joinall],
|
||||
[[$2]m4_if(m4_eval([$# <= 2]), [1], [],
|
||||
[_m4_foreach([$1], [], m4_shift($@))])])
|
||||
|
||||
# m4_list_cmp(A, B)
|
||||
# -----------------
|
||||
# Compare the two lists of integer expressions A and B.
|
||||
#
|
||||
# m4_list_cmp takes care of any side effects; we only override
|
||||
# _m4_list_cmp_raw, where we can safely expand lists multiple times.
|
||||
# First, insert padding so that both lists are the same length; the
|
||||
# trailing +0 is necessary to handle a missing list. Next, create a
|
||||
# temporary macro to perform pairwise comparisons until an inequality
|
||||
# is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as
|
||||
# m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])],
|
||||
# m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])],
|
||||
# [0]_m4_popdef([_m4_cmp]))
|
||||
# then calls _m4_cmp([1+0], [0*2], [1], [2+0])
|
||||
m4_define([_m4_list_cmp_raw],
|
||||
[m4_if([$1], [$2], 0,
|
||||
[_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)),
|
||||
$2+0_m4_list_pad(m4_count($2), m4_count($1)))])])
|
||||
|
||||
m4_define([_m4_list_pad],
|
||||
[m4_if(m4_eval($1 < $2), [1],
|
||||
[_m4_for(m4_incr([$1]), [$2], [1], [,0*])])])
|
||||
|
||||
m4_define([_m4_list_cmp],
|
||||
[m4_pushdef([_m4_cmp], [m4_if(]_m4_for(
|
||||
[1], m4_eval([$# >> 1]), [1], [$0_(], [,]m4_eval([$# >> 1])[)])[
|
||||
[0]_m4_popdef([_m4_cmp]))])_m4_cmp($@)])
|
||||
|
||||
m4_define([_m4_list_cmp_],
|
||||
[$0_([$1], m4_eval([$1 + $2]))])
|
||||
|
||||
m4_define([_m4_list_cmp__],
|
||||
[[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])],
|
||||
]])
|
||||
|
||||
# m4_max(EXPR, ...)
|
||||
# m4_min(EXPR, ...)
|
||||
# -----------------
|
||||
# Return the decimal value of the maximum (or minimum) in a series of
|
||||
# integer expressions.
|
||||
#
|
||||
# _m4_foreach to the rescue; we only need to replace _m4_minmax. Here,
|
||||
# we need a temporary macro to track the best answer so far, so that
|
||||
# the foreach expression is tractable.
|
||||
m4_define([_m4_minmax],
|
||||
[m4_pushdef([_m4_best], m4_eval([$2]))_m4_foreach(
|
||||
[m4_define([_m4_best], $1(_m4_best,], [))], m4_shift($@))]dnl
|
||||
[_m4_best[]_m4_popdef([_m4_best])])
|
||||
|
||||
# m4_set_add_all(SET, VALUE...)
|
||||
# -----------------------------
|
||||
# Add each VALUE into SET. This is O(n) in the number of VALUEs, and
|
||||
# can be faster than calling m4_set_add for each VALUE.
|
||||
#
|
||||
# _m4_foreach to the rescue. If no deletions have occurred, then
|
||||
# avoid the speed penalty of m4_set_add.
|
||||
m4_define([m4_set_add_all],
|
||||
[m4_if([$#], [0], [], [$#], [1], [],
|
||||
[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
|
||||
+ m4_len(_m4_foreach(m4_ifdef([_m4_set_cleanup($1)],
|
||||
[[m4_set_add]], [[_$0]])[([$1],], [)], $@))))])])
|
||||
|
||||
m4_define([_m4_set_add_all],
|
||||
[m4_ifdef([_m4_set([$1],$2)], [],
|
||||
[m4_define([_m4_set([$1],$2)],
|
||||
[1])m4_pushdef([_m4_set([$1])], [$2])-])])
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,154 @@
|
|||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
m4_pushdef([b4_copyright_years],
|
||||
[2002-2013])
|
||||
|
||||
# b4_stack_define
|
||||
# ---------------
|
||||
m4_define([b4_stack_define],
|
||||
[[ template <class T, class S = std::vector<T> >
|
||||
class stack
|
||||
{
|
||||
public:
|
||||
// Hide our reversed order.
|
||||
typedef typename S::reverse_iterator iterator;
|
||||
typedef typename S::const_reverse_iterator const_iterator;
|
||||
|
||||
stack ()
|
||||
: seq_ ()
|
||||
{
|
||||
}
|
||||
|
||||
stack (unsigned int n)
|
||||
: seq_ (n)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
T&
|
||||
operator[] (unsigned int i)
|
||||
{
|
||||
return seq_[seq_.size () - 1 - i];
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator[] (unsigned int i) const
|
||||
{
|
||||
return seq_[seq_.size () - 1 - i];
|
||||
}
|
||||
|
||||
/// Steal the contents of \a t.
|
||||
///
|
||||
/// Close to move-semantics.
|
||||
inline
|
||||
void
|
||||
push (T& t)
|
||||
{
|
||||
seq_.push_back (T());
|
||||
operator[](0).move (t);
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
pop (unsigned int n = 1)
|
||||
{
|
||||
for (; n; --n)
|
||||
seq_.pop_back ();
|
||||
}
|
||||
|
||||
void
|
||||
clear ()
|
||||
{
|
||||
seq_.clear ();
|
||||
}
|
||||
|
||||
inline
|
||||
typename S::size_type
|
||||
size () const
|
||||
{
|
||||
return seq_.size ();
|
||||
}
|
||||
|
||||
inline
|
||||
const_iterator
|
||||
begin () const
|
||||
{
|
||||
return seq_.rbegin ();
|
||||
}
|
||||
|
||||
inline
|
||||
const_iterator
|
||||
end () const
|
||||
{
|
||||
return seq_.rend ();
|
||||
}
|
||||
|
||||
private:
|
||||
stack (const stack&);
|
||||
stack& operator= (const stack&);
|
||||
/// The wrapped container.
|
||||
S seq_;
|
||||
};
|
||||
|
||||
/// Present a slice of the top of a stack.
|
||||
template <class T, class S = stack<T> >
|
||||
class slice
|
||||
{
|
||||
public:
|
||||
slice (const S& stack, unsigned int range)
|
||||
: stack_ (stack)
|
||||
, range_ (range)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const T&
|
||||
operator [] (unsigned int i) const
|
||||
{
|
||||
return stack_[range_ - i];
|
||||
}
|
||||
|
||||
private:
|
||||
const S& stack_;
|
||||
unsigned int range_;
|
||||
};
|
||||
]])
|
||||
|
||||
b4_defines_if(
|
||||
[b4_output_begin([b4_dir_prefix[]stack.hh])
|
||||
b4_copyright([Stack handling for Bison parsers in C++])[
|
||||
|
||||
/**
|
||||
** \file ]b4_dir_prefix[stack.hh
|
||||
** Define the ]b4_namespace_ref[::stack class.
|
||||
*/
|
||||
|
||||
]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[
|
||||
|
||||
# include <vector>
|
||||
|
||||
]b4_namespace_open[
|
||||
]b4_stack_define[
|
||||
]b4_namespace_close[
|
||||
|
||||
]b4_cpp_guard_close([b4_dir_prefix[]stack.hh])
|
||||
b4_output_end()
|
||||
])
|
||||
|
||||
m4_popdef([b4_copyright_years])
|
|
@ -0,0 +1,362 @@
|
|||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
## --------- ##
|
||||
## variant. ##
|
||||
## --------- ##
|
||||
|
||||
# b4_symbol_variant(YYTYPE, YYVAL, ACTION, [ARGS])
|
||||
# ------------------------------------------------
|
||||
# Run some ACTION ("build", or "destroy") on YYVAL of symbol type
|
||||
# YYTYPE.
|
||||
m4_define([b4_symbol_variant],
|
||||
[m4_pushdef([b4_dollar_dollar],
|
||||
[$2.$3< $][3 > (m4_shift3($@))])dnl
|
||||
switch ($1)
|
||||
{
|
||||
b4_type_foreach([b4_type_action_])[]dnl
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
])
|
||||
|
||||
|
||||
# _b4_char_sizeof_counter
|
||||
# -----------------------
|
||||
# A counter used by _b4_char_sizeof_dummy to create fresh symbols.
|
||||
m4_define([_b4_char_sizeof_counter],
|
||||
[0])
|
||||
|
||||
# _b4_char_sizeof_dummy
|
||||
# ---------------------
|
||||
# At each call return a new C++ identifier.
|
||||
m4_define([_b4_char_sizeof_dummy],
|
||||
[m4_define([_b4_char_sizeof_counter], m4_incr(_b4_char_sizeof_counter))dnl
|
||||
dummy[]_b4_char_sizeof_counter])
|
||||
|
||||
|
||||
# b4_char_sizeof(SYMBOL-NUMS)
|
||||
# ---------------------------
|
||||
# To be mapped on the list of type names to produce:
|
||||
#
|
||||
# char dummy1[sizeof(type_name_1)];
|
||||
# char dummy2[sizeof(type_name_2)];
|
||||
#
|
||||
# for defined type names.
|
||||
m4_define([b4_char_sizeof],
|
||||
[b4_symbol_if([$1], [has_type],
|
||||
[
|
||||
m4_map([ b4_symbol_tag_comment], [$@])dnl
|
||||
char _b4_char_sizeof_dummy@{sizeof(b4_symbol([$1], [type]))@};
|
||||
])])
|
||||
|
||||
|
||||
# b4_variant_includes
|
||||
# -------------------
|
||||
# The needed includes for variants support.
|
||||
m4_define([b4_variant_includes],
|
||||
[b4_parse_assert_if([[#include <typeinfo>]])[
|
||||
#ifndef YYASSERT
|
||||
# include <cassert>
|
||||
# define YYASSERT assert
|
||||
#endif
|
||||
]])
|
||||
|
||||
# b4_variant_define
|
||||
# -----------------
|
||||
# Define "variant".
|
||||
m4_define([b4_variant_define],
|
||||
[[ /// A char[S] buffer to store and retrieve objects.
|
||||
///
|
||||
/// Sort of a variant, but does not keep track of the nature
|
||||
/// of the stored data, since that knowledge is available
|
||||
/// via the current state.
|
||||
template <size_t S>
|
||||
struct variant
|
||||
{
|
||||
/// Type of *this.
|
||||
typedef variant<S> self_type;
|
||||
|
||||
/// Empty construction.
|
||||
variant ()]b4_parse_assert_if([
|
||||
: yytname_ (YY_NULL)])[
|
||||
{}
|
||||
|
||||
/// Construct and fill.
|
||||
template <typename T>
|
||||
variant (const T& t)]b4_parse_assert_if([
|
||||
: yytname_ (typeid (T).name ())])[
|
||||
{
|
||||
YYASSERT (sizeof (T) <= S);
|
||||
new (yyas_<T> ()) T (t);
|
||||
}
|
||||
|
||||
/// Destruction, allowed only if empty.
|
||||
~variant ()
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (!yytname_);
|
||||
])[}
|
||||
|
||||
/// Instantiate an empty \a T in here.
|
||||
template <typename T>
|
||||
T&
|
||||
build ()
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (!yytname_);
|
||||
YYASSERT (sizeof (T) <= S);
|
||||
yytname_ = typeid (T).name ();])[
|
||||
return *new (yyas_<T> ()) T;
|
||||
}
|
||||
|
||||
/// Instantiate a \a T in here from \a t.
|
||||
template <typename T>
|
||||
T&
|
||||
build (const T& t)
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (!yytname_);
|
||||
YYASSERT (sizeof (T) <= S);
|
||||
yytname_ = typeid (T).name ();])[
|
||||
return *new (yyas_<T> ()) T (t);
|
||||
}
|
||||
|
||||
/// Accessor to a built \a T.
|
||||
template <typename T>
|
||||
T&
|
||||
as ()
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (yytname_ == typeid (T).name ());
|
||||
YYASSERT (sizeof (T) <= S);])[
|
||||
return *yyas_<T> ();
|
||||
}
|
||||
|
||||
/// Const accessor to a built \a T (for %printer).
|
||||
template <typename T>
|
||||
const T&
|
||||
as () const
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (yytname_ == typeid (T).name ());
|
||||
YYASSERT (sizeof (T) <= S);])[
|
||||
return *yyas_<T> ();
|
||||
}
|
||||
|
||||
/// Swap the content with \a other, of same type.
|
||||
///
|
||||
/// Both variants must be built beforehand, because swapping the actual
|
||||
/// data requires reading it (with as()), and this is not possible on
|
||||
/// unconstructed variants: it would require some dynamic testing, which
|
||||
/// should not be the variant's responsability.
|
||||
/// Swapping between built and (possibly) non-built is done with
|
||||
/// variant::move ().
|
||||
template <typename T>
|
||||
void
|
||||
swap (self_type& other)
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (yytname_);
|
||||
YYASSERT (yytname_ == other.yytname_);])[
|
||||
std::swap (as<T> (), other.as<T> ());
|
||||
}
|
||||
|
||||
/// Move the content of \a other to this.
|
||||
///
|
||||
/// Destroys \a other.
|
||||
template <typename T>
|
||||
void
|
||||
move (self_type& other)
|
||||
{]b4_parse_assert_if([
|
||||
YYASSERT (!yytname_);])[
|
||||
build<T> ();
|
||||
swap<T> (other);
|
||||
other.destroy<T> ();
|
||||
}
|
||||
|
||||
/// Copy the content of \a other to this.
|
||||
template <typename T>
|
||||
void
|
||||
copy (const self_type& other)
|
||||
{
|
||||
build<T> (other.as<T> ());
|
||||
}
|
||||
|
||||
/// Destroy the stored \a T.
|
||||
template <typename T>
|
||||
void
|
||||
destroy ()
|
||||
{
|
||||
as<T> ().~T ();]b4_parse_assert_if([
|
||||
yytname_ = YY_NULL;])[
|
||||
}
|
||||
|
||||
private:
|
||||
/// Prohibit blind copies.
|
||||
self_type& operator=(const self_type&);
|
||||
variant (const self_type&);
|
||||
|
||||
/// Accessor to raw memory as \a T.
|
||||
template <typename T>
|
||||
T*
|
||||
yyas_ ()
|
||||
{
|
||||
void *yyp = yybuffer_.yyraw;
|
||||
return static_cast<T*> (yyp);
|
||||
}
|
||||
|
||||
/// Const accessor to raw memory as \a T.
|
||||
template <typename T>
|
||||
const T*
|
||||
yyas_ () const
|
||||
{
|
||||
const void *yyp = yybuffer_.yyraw;
|
||||
return static_cast<const T*> (yyp);
|
||||
}
|
||||
|
||||
union
|
||||
{
|
||||
/// Strongest alignment constraints.
|
||||
long double yyalign_me;
|
||||
/// A buffer large enough to store any of the semantic values.
|
||||
char yyraw[S];
|
||||
} yybuffer_;]b4_parse_assert_if([
|
||||
|
||||
/// Whether the content is built: if defined, the name of the stored type.
|
||||
const char *yytname_;])[
|
||||
};
|
||||
]])
|
||||
|
||||
|
||||
## -------------------------- ##
|
||||
## Adjustments for variants. ##
|
||||
## -------------------------- ##
|
||||
|
||||
|
||||
# b4_value_type_declare
|
||||
# ---------------------
|
||||
# Declare semantic_type.
|
||||
m4_define([b4_value_type_declare],
|
||||
[[ /// An auxiliary type to compute the largest semantic type.
|
||||
union union_type
|
||||
{]b4_type_foreach([b4_char_sizeof])[};
|
||||
|
||||
/// Symbol semantic values.
|
||||
typedef variant<sizeof(union_type)> semantic_type;][]dnl
|
||||
])
|
||||
|
||||
|
||||
# How the semantic value is extracted when using variants.
|
||||
|
||||
# b4_symbol_value(VAL, [TYPE])
|
||||
# ----------------------------
|
||||
m4_define([b4_symbol_value],
|
||||
[m4_ifval([$2],
|
||||
[$1.as< $2 > ()],
|
||||
[$1])])
|
||||
|
||||
# b4_symbol_value_template(VAL, [TYPE])
|
||||
# -------------------------------------
|
||||
# Same as b4_symbol_value, but used in a template method.
|
||||
m4_define([b4_symbol_value_template],
|
||||
[m4_ifval([$2],
|
||||
[$1.template as< $2 > ()],
|
||||
[$1])])
|
||||
|
||||
|
||||
|
||||
## ------------- ##
|
||||
## make_SYMBOL. ##
|
||||
## ------------- ##
|
||||
|
||||
|
||||
# b4_symbol_constructor_declare_(SYMBOL-NUMBER)
|
||||
# ---------------------------------------------
|
||||
# Declare the overloaded version of make_symbol for the (common) type of
|
||||
# these SYMBOL-NUMBERS. Use at class-level.
|
||||
m4_define([b4_symbol_constructor_declare_],
|
||||
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
|
||||
[ static inline
|
||||
symbol_type
|
||||
make_[]b4_symbol_([$1], [id]) (dnl
|
||||
b4_join(b4_symbol_if([$1], [has_type],
|
||||
[const b4_symbol([$1], [type])& v]),
|
||||
b4_locations_if([const location_type& l])));
|
||||
|
||||
])])])
|
||||
|
||||
|
||||
# b4_symbol_constructor_declare
|
||||
# -----------------------------
|
||||
# Declare symbol constructors for all the value types.
|
||||
# Use at class-level.
|
||||
m4_define([b4_symbol_constructor_declare],
|
||||
[ // Symbol constructors declarations.
|
||||
b4_symbol_foreach([b4_symbol_constructor_declare_])])
|
||||
|
||||
|
||||
|
||||
# b4_symbol_constructor_define_(SYMBOL-NUMBER)
|
||||
# --------------------------------------------
|
||||
# Define symbol constructor for this SYMBOL-NUMBER.
|
||||
m4_define([b4_symbol_constructor_define_],
|
||||
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
|
||||
[ b4_parser_class_name::symbol_type
|
||||
b4_parser_class_name::make_[]b4_symbol_([$1], [id]) (dnl
|
||||
b4_join(b4_symbol_if([$1], [has_type],
|
||||
[const b4_symbol([$1], [type])& v]),
|
||||
b4_locations_if([const location_type& l])))
|
||||
{
|
||||
return symbol_type (b4_join([token::b4_symbol([$1], [id])],
|
||||
b4_symbol_if([$1], [has_type], [v]),
|
||||
b4_locations_if([l])));
|
||||
|
||||
}
|
||||
|
||||
])])])
|
||||
|
||||
|
||||
# b4_basic_symbol_constructor_declare
|
||||
# -----------------------------------
|
||||
# Generate a constructor declaration for basic_symbol from given type.
|
||||
m4_define([b4_basic_symbol_constructor_declare],
|
||||
[[
|
||||
basic_symbol (]b4_join(
|
||||
[typename Base::kind_type t],
|
||||
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
|
||||
b4_locations_if([const location_type& l]))[);
|
||||
]])
|
||||
|
||||
# b4_basic_symbol_constructor_define
|
||||
# ----------------------------------
|
||||
# Generate a constructor implementation for basic_symbol from given type.
|
||||
m4_define([b4_basic_symbol_constructor_define],
|
||||
[[
|
||||
template <typename Base>
|
||||
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
|
||||
[typename Base::kind_type t],
|
||||
b4_symbol_if([$1], [has_type], const b4_symbol([$1], [type])[ v]),
|
||||
b4_locations_if([const location_type& l]))[)
|
||||
: Base (t)
|
||||
, value (]b4_symbol_if([$1], [has_type], [v])[)]b4_locations_if([
|
||||
, location (l)])[
|
||||
{}
|
||||
]])
|
||||
|
||||
# b4_symbol_constructor_define
|
||||
# ----------------------------
|
||||
# Define the overloaded versions of make_symbol for all the value types.
|
||||
m4_define([b4_symbol_constructor_define],
|
||||
[ // Implementation of make_symbol for each symbol type.
|
||||
b4_symbol_foreach([b4_symbol_constructor_define_])])
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
bison.xsl - common templates for Bison XSLT.
|
||||
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bison="http://www.gnu.org/software/bison/">
|
||||
|
||||
<xsl:key
|
||||
name="bison:symbolByName"
|
||||
match="/bison-xml-report/grammar/nonterminals/nonterminal"
|
||||
use="@name"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:symbolByName"
|
||||
match="/bison-xml-report/grammar/terminals/terminal"
|
||||
use="@name"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:ruleByNumber"
|
||||
match="/bison-xml-report/grammar/rules/rule"
|
||||
use="@number"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:ruleByLhs"
|
||||
match="/bison-xml-report/grammar/rules/rule[
|
||||
@usefulness != 'useless-in-grammar']"
|
||||
use="lhs"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:ruleByRhs"
|
||||
match="/bison-xml-report/grammar/rules/rule[
|
||||
@usefulness != 'useless-in-grammar']"
|
||||
use="rhs/symbol"
|
||||
/>
|
||||
|
||||
<!-- For the specified state, output: #sr-conflicts,#rr-conflicts -->
|
||||
<xsl:template match="state" mode="bison:count-conflicts">
|
||||
<xsl:variable name="transitions" select="actions/transitions"/>
|
||||
<xsl:variable name="reductions" select="actions/reductions"/>
|
||||
<xsl:variable
|
||||
name="terminals"
|
||||
select="
|
||||
$transitions/transition[@type='shift']/@symbol
|
||||
| $reductions/reduction/@symbol
|
||||
"
|
||||
/>
|
||||
<xsl:variable name="conflict-data">
|
||||
<xsl:for-each select="$terminals">
|
||||
<xsl:variable name="name" select="."/>
|
||||
<xsl:if test="generate-id($terminals[. = $name][1]) = generate-id(.)">
|
||||
<xsl:variable
|
||||
name="shift-count"
|
||||
select="count($transitions/transition[@symbol=$name])"
|
||||
/>
|
||||
<xsl:variable
|
||||
name="reduce-count"
|
||||
select="count($reductions/reduction[@symbol=$name])"
|
||||
/>
|
||||
<xsl:if test="$shift-count > 0 and $reduce-count > 0">
|
||||
<xsl:text>s</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$reduce-count > 1">
|
||||
<xsl:text>r</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="string-length(translate($conflict-data, 'r', ''))"/>
|
||||
<xsl:text>,</xsl:text>
|
||||
<xsl:value-of select="string-length(translate($conflict-data, 's', ''))"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="space">
|
||||
<xsl:param name="repeat">0</xsl:param>
|
||||
<xsl:param name="fill" select="' '"/>
|
||||
<xsl:if test="number($repeat) >= 1">
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$repeat - 1"/>
|
||||
<xsl:with-param name="fill" select="$fill"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$fill"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,397 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Wojciech Polak <polak@gnu.org>.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bison="http://www.gnu.org/software/bison/">
|
||||
|
||||
<xsl:import href="bison.xsl"/>
|
||||
<xsl:output method="text" encoding="UTF-8" indent="no"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="bison-xml-report"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bison-xml-report">
|
||||
<xsl:text>// Generated by GNU Bison </xsl:text>
|
||||
<xsl:value-of select="@version"/>
|
||||
<xsl:text>. </xsl:text>
|
||||
<xsl:text>// Report bugs to <</xsl:text>
|
||||
<xsl:value-of select="@bug-report"/>
|
||||
<xsl:text>>. </xsl:text>
|
||||
<xsl:text>// Home page: <</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<xsl:text>>. </xsl:text>
|
||||
<xsl:apply-templates select="automaton">
|
||||
<xsl:with-param name="filename" select="filename"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton">
|
||||
<xsl:param name="filename"/>
|
||||
<xsl:text>digraph "</xsl:text>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="$filename"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>" {
|
||||
node [fontname = courier, shape = box, colorscheme = paired6]
|
||||
edge [fontname = courier]
|
||||
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="state"/>
|
||||
<xsl:text>} </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton/state">
|
||||
<xsl:call-template name="output-node">
|
||||
<xsl:with-param name="number" select="@number"/>
|
||||
<xsl:with-param name="label">
|
||||
<xsl:apply-templates select="itemset/item"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="actions/transitions"/>
|
||||
<xsl:apply-templates select="actions/reductions">
|
||||
<xsl:with-param name="staten">
|
||||
<xsl:value-of select="@number"/>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/reductions">
|
||||
<xsl:param name="staten"/>
|
||||
<xsl:for-each select='reduction'>
|
||||
<!-- These variables are needed because the current context can't be
|
||||
refered to directly in XPath expressions. -->
|
||||
<xsl:variable name="rul">
|
||||
<xsl:value-of select="@rule"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="ena">
|
||||
<xsl:value-of select="@enabled"/>
|
||||
</xsl:variable>
|
||||
<!-- The foreach's body is protected by this, so that we are actually
|
||||
going to iterate once per reduction rule, and not per lookahead. -->
|
||||
<xsl:if test='not(preceding-sibling::*[@rule=$rul and @enabled=$ena])'>
|
||||
<xsl:variable name="rule">
|
||||
<xsl:choose>
|
||||
<!-- The acceptation state is refered to as 'accept' in the XML, but
|
||||
just as '0' in the DOT. -->
|
||||
<xsl:when test="@rule='accept'">
|
||||
<xsl:text>0</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@rule"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- The edge's beginning -->
|
||||
<xsl:call-template name="reduction-edge-start">
|
||||
<xsl:with-param name="state" select="$staten"/>
|
||||
<xsl:with-param name="rule" select="$rule"/>
|
||||
<xsl:with-param name="enabled" select="@enabled"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- The edge's tokens -->
|
||||
<!-- Don't show labels for the default action. In other cases, there will
|
||||
always be at least one token, so 'label="[]"' will not occur. -->
|
||||
<xsl:if test='$rule!=0 and not(../reduction[@enabled=$ena and @rule=$rule and @symbol="$default"])'>
|
||||
<xsl:text>label="[</xsl:text>
|
||||
<xsl:for-each select='../reduction[@enabled=$ena and @rule=$rule]'>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="@symbol"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="position() != last ()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>]", </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<!-- The edge's end -->
|
||||
<xsl:text>style=solid] </xsl:text>
|
||||
|
||||
<!-- The diamond representing the reduction -->
|
||||
<xsl:call-template name="reduction-node">
|
||||
<xsl:with-param name="state" select="$staten"/>
|
||||
<xsl:with-param name="rule" select="$rule"/>
|
||||
<xsl:with-param name="color">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@enabled="true"'>
|
||||
<xsl:text>3</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>5</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/transitions">
|
||||
<xsl:apply-templates select="transition"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
|
||||
<xsl:with-param name="point" select="@point"/>
|
||||
<xsl:with-param name="num" select="@rule-number"/>
|
||||
<xsl:with-param name="prev-lhs"
|
||||
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
|
||||
/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="lookaheads"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rule">
|
||||
<xsl:param name="point"/>
|
||||
<xsl:param name="num"/>
|
||||
<xsl:param name="prev-lhs"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$num < 10">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$num < 100">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="$num"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="lhs"/>
|
||||
<xsl:text>:</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$point = 0">
|
||||
<xsl:text> .</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="rhs/symbol|rhs/empty">
|
||||
<xsl:apply-templates select="."/>
|
||||
<xsl:if test="$point = position()">
|
||||
<xsl:text> .</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="empty"/>
|
||||
|
||||
<xsl:template match="lookaheads">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:apply-templates select="symbol"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lookaheads/symbol">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="reduction-edge-start">
|
||||
<xsl:param name="state"/>
|
||||
<xsl:param name="rule"/>
|
||||
<xsl:param name="enabled"/>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text> -> "</xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:if test='$enabled = "false"'>
|
||||
<xsl:text>d</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>" [</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="reduction-node">
|
||||
<xsl:param name="state"/>
|
||||
<xsl:param name="rule"/>
|
||||
<xsl:param name="color"/>
|
||||
|
||||
<xsl:text> "</xsl:text>
|
||||
<xsl:value-of select="$state"/>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:if test="$color = 5">
|
||||
<xsl:text>d</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>" [label="</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$rule = 0">
|
||||
<xsl:text>Acc", fillcolor=1</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>R</xsl:text>
|
||||
<xsl:value-of select="$rule"/>
|
||||
<xsl:text>", fillcolor=</xsl:text>
|
||||
<xsl:value-of select="$color"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>, shape=diamond, style=filled] </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="transition">
|
||||
<xsl:call-template name="output-edge">
|
||||
<xsl:with-param name="src" select="../../../@number"/>
|
||||
<xsl:with-param name="dst" select="@state"/>
|
||||
<xsl:with-param name="style">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@symbol = 'error'">
|
||||
<xsl:text>dotted</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>dashed</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="label">
|
||||
<xsl:if test="not(@symbol = 'error')">
|
||||
<xsl:value-of select="@symbol"/>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="output-node">
|
||||
<xsl:param name="number"/>
|
||||
<xsl:param name="label"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$number"/>
|
||||
<xsl:text> [label="</xsl:text>
|
||||
<xsl:text>State </xsl:text>
|
||||
<xsl:value-of select="$number"/>
|
||||
<xsl:text>\n</xsl:text>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="$label"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>\l"] </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="output-edge">
|
||||
<xsl:param name="src"/>
|
||||
<xsl:param name="dst"/>
|
||||
<xsl:param name="style"/>
|
||||
<xsl:param name="label"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$src"/>
|
||||
<xsl:text> -> </xsl:text>
|
||||
<xsl:value-of select="$dst"/>
|
||||
<xsl:text> [style=</xsl:text>
|
||||
<xsl:value-of select="$style"/>
|
||||
<xsl:if test="$label and $label != ''">
|
||||
<xsl:text> label="</xsl:text>
|
||||
<xsl:call-template name="escape">
|
||||
<xsl:with-param name="subject" select="$label"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>"</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>] </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="escape">
|
||||
<xsl:param name="subject"/> <!-- required -->
|
||||
<xsl:call-template name="string-replace">
|
||||
<xsl:with-param name="subject">
|
||||
<xsl:call-template name="string-replace">
|
||||
<xsl:with-param name="subject">
|
||||
<xsl:call-template name="string-replace">
|
||||
<xsl:with-param name="subject" select="$subject"/>
|
||||
<xsl:with-param name="search" select="'\'"/>
|
||||
<xsl:with-param name="replace" select="'\\'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="search" select="'"'"/>
|
||||
<xsl:with-param name="replace" select="'\"'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="search" select="' '"/>
|
||||
<xsl:with-param name="replace" select="'\l'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="string-replace">
|
||||
<xsl:param name="subject"/>
|
||||
<xsl:param name="search"/>
|
||||
<xsl:param name="replace"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($subject, $search)">
|
||||
<xsl:variable name="before" select="substring-before($subject, $search)"/>
|
||||
<xsl:variable name="after" select="substring-after($subject, $search)"/>
|
||||
<xsl:value-of select="$before"/>
|
||||
<xsl:value-of select="$replace"/>
|
||||
<xsl:call-template name="string-replace">
|
||||
<xsl:with-param name="subject" select="$after"/>
|
||||
<xsl:with-param name="search" select="$search"/>
|
||||
<xsl:with-param name="replace" select="$replace"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$subject"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="lpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,569 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
xml2text.xsl - transform Bison XML Report into plain text.
|
||||
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Wojciech Polak <polak@gnu.org>.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bison="http://www.gnu.org/software/bison/">
|
||||
|
||||
<xsl:import href="bison.xsl"/>
|
||||
<xsl:output method="text" encoding="UTF-8" indent="no"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="bison-xml-report"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bison-xml-report">
|
||||
<xsl:apply-templates select="grammar" mode="reductions"/>
|
||||
<xsl:apply-templates select="grammar" mode="useless-in-parser"/>
|
||||
<xsl:apply-templates select="automaton" mode="conflicts"/>
|
||||
<xsl:apply-templates select="grammar"/>
|
||||
<xsl:apply-templates select="automaton"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar" mode="reductions">
|
||||
<xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
|
||||
<xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
|
||||
<xsl:apply-templates select="rules" mode="useless-in-grammar"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="nonterminals" mode="useless-in-grammar">
|
||||
<xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<xsl:text>Nonterminals useless in grammar </xsl:text>
|
||||
<xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="terminals" mode="unused-in-grammar">
|
||||
<xsl:if test="terminal[@usefulness='unused-in-grammar']">
|
||||
<xsl:text>Terminals unused in grammar </xsl:text>
|
||||
<xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
|
||||
<xsl:sort select="@symbol-number" data-type="number"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rules" mode="useless-in-grammar">
|
||||
<xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
|
||||
<xsl:if test="$set">
|
||||
<xsl:text>Rules useless in grammar </xsl:text>
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param name="rule-set" select="$set"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar" mode="useless-in-parser">
|
||||
<xsl:variable
|
||||
name="set" select="rules/rule[@usefulness='useless-in-parser']"
|
||||
/>
|
||||
<xsl:if test="$set">
|
||||
<xsl:text>Rules useless in parser due to conflicts </xsl:text>
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param name="rule-set" select="$set"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar">
|
||||
<xsl:text>Grammar </xsl:text>
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param
|
||||
name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="terminals"/>
|
||||
<xsl:apply-templates select="nonterminals"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="style-rule-set">
|
||||
<xsl:param name="rule-set"/>
|
||||
<xsl:for-each select="$rule-set">
|
||||
<xsl:apply-templates select=".">
|
||||
<xsl:with-param name="pad" select="'3'"/>
|
||||
<xsl:with-param name="prev-lhs">
|
||||
<xsl:if test="position()>1">
|
||||
<xsl:variable name="position" select="position()"/>
|
||||
<xsl:value-of select="$rule-set[$position - 1]/lhs"/>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar/terminals">
|
||||
<xsl:text>Terminals, with rules where they appear </xsl:text>
|
||||
<xsl:apply-templates select="terminal"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar/nonterminals">
|
||||
<xsl:text>Nonterminals, with rules where they appear </xsl:text>
|
||||
<xsl:apply-templates select="nonterminal[@usefulness!='useless-in-grammar']"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="terminal">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:call-template name="line-wrap">
|
||||
<xsl:with-param name="first-line-length">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(@name) > 66">0</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="66 - string-length(@name)" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="line-length" select="66" />
|
||||
<xsl:with-param name="text">
|
||||
<xsl:value-of select="concat(' (', @token-number, ')')"/>
|
||||
<xsl:for-each select="key('bison:ruleByRhs', @name)">
|
||||
<xsl:value-of select="concat(' ', @number)"/>
|
||||
</xsl:for-each>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="nonterminal">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:value-of select="concat(' (', @symbol-number, ')')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:variable name="output">
|
||||
<xsl:call-template name="line-wrap">
|
||||
<xsl:with-param name="line-length" select="66" />
|
||||
<xsl:with-param name="text">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="key('bison:ruleByLhs', @name)">
|
||||
<xsl:text>on@left:</xsl:text>
|
||||
<xsl:for-each select="key('bison:ruleByLhs', @name)">
|
||||
<xsl:value-of select="concat(' ', @number)"/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="key('bison:ruleByRhs', @name)">
|
||||
<xsl:if test="key('bison:ruleByLhs', @name)">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>on@right:</xsl:text>
|
||||
<xsl:for-each select="key('bison:ruleByRhs', @name)">
|
||||
<xsl:value-of select="concat(' ', @number)"/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="translate($output, '@', ' ')" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton" mode="conflicts">
|
||||
<xsl:variable name="conflict-report">
|
||||
<xsl:apply-templates select="state" mode="conflicts"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="string-length($conflict-report) != 0">
|
||||
<xsl:value-of select="$conflict-report"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="state" mode="conflicts">
|
||||
<xsl:variable name="conflict-counts">
|
||||
<xsl:apply-templates select="." mode="bison:count-conflicts" />
|
||||
</xsl:variable>
|
||||
<xsl:variable
|
||||
name="sr-count" select="substring-before($conflict-counts, ',')"
|
||||
/>
|
||||
<xsl:variable
|
||||
name="rr-count" select="substring-after($conflict-counts, ',')"
|
||||
/>
|
||||
<xsl:if test="$sr-count > 0 or $rr-count > 0">
|
||||
<xsl:value-of select="concat('State ', @number, ' conflicts:')"/>
|
||||
<xsl:if test="$sr-count > 0">
|
||||
<xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
|
||||
<xsl:if test="$rr-count > 0">
|
||||
<xsl:value-of select="(',')"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="$rr-count > 0">
|
||||
<xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="' '"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton">
|
||||
<xsl:apply-templates select="state">
|
||||
<xsl:with-param name="pad" select="'3'"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton/state">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text>State </xsl:text>
|
||||
<xsl:value-of select="@number"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="itemset/item">
|
||||
<xsl:with-param name="pad" select="$pad"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="actions/transitions">
|
||||
<xsl:with-param name="type" select="'shift'"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="actions/errors"/>
|
||||
<xsl:apply-templates select="actions/reductions"/>
|
||||
<xsl:apply-templates select="actions/transitions">
|
||||
<xsl:with-param name="type" select="'goto'"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="solved-conflicts"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/transitions">
|
||||
<xsl:param name="type"/>
|
||||
<xsl:if test="transition[@type = $type]">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="transition[@type = $type]">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/errors">
|
||||
<xsl:if test="error">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="error">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/reductions">
|
||||
<xsl:if test="reduction">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="reduction">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates
|
||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||
>
|
||||
<xsl:with-param name="itemset" select="'true'"/>
|
||||
<xsl:with-param name="pad" select="$pad"/>
|
||||
<xsl:with-param
|
||||
name="prev-lhs"
|
||||
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
|
||||
/>
|
||||
<xsl:with-param name="point" select="@point"/>
|
||||
<xsl:with-param name="lookaheads">
|
||||
<xsl:apply-templates select="lookaheads"/>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rule">
|
||||
<xsl:param name="itemset"/>
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-lhs"/>
|
||||
<xsl:param name="point"/>
|
||||
<xsl:param name="lookaheads"/>
|
||||
|
||||
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- LHS -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="lhs"/>
|
||||
<xsl:text>:</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- RHS -->
|
||||
<xsl:for-each select="rhs/*">
|
||||
<xsl:if test="position() = $point + 1">
|
||||
<xsl:text> .</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$itemset = 'true' and name(.) != 'empty'">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$itemset != 'true'">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:if>
|
||||
<xsl:if test="position() = last() and position() = $point">
|
||||
<xsl:text> .</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="$lookaheads">
|
||||
<xsl:value-of select="$lookaheads"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="empty">
|
||||
<xsl:text> %empty</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lookaheads">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:apply-templates select="symbol"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lookaheads/symbol">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="transition">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<xsl:text>shift, and go to state </xsl:text>
|
||||
<xsl:value-of select="@state"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'goto'">
|
||||
<xsl:text>go to state </xsl:text>
|
||||
<xsl:value-of select="@state"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="error">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>error</xsl:text>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="text()"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="reduction">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="@enabled = 'false'">
|
||||
<xsl:text>[</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@rule = 'accept'">
|
||||
<xsl:text>accept</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>reduce using rule </xsl:text>
|
||||
<xsl:value-of select="@rule"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@enabled = 'false'">
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="solved-conflicts">
|
||||
<xsl:if test="resolution">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="resolution"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resolution">
|
||||
<xsl:text> Conflict between rule </xsl:text>
|
||||
<xsl:value-of select="@rule"/>
|
||||
<xsl:text> and token </xsl:text>
|
||||
<xsl:value-of select="@symbol"/>
|
||||
<xsl:text> resolved as </xsl:text>
|
||||
<xsl:if test="@type = 'error'">
|
||||
<xsl:text>an </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@type"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>). </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="max-width-symbol">
|
||||
<xsl:param name="node"/>
|
||||
<xsl:variable name="longest">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||
order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="$longest"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="lpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="rpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="line-wrap">
|
||||
<xsl:param name="line-length"/> <!-- required -->
|
||||
<xsl:param name="first-line-length" select="$line-length"/>
|
||||
<xsl:param name="text"/> <!-- required -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="normalize-space($text) = ''" />
|
||||
<xsl:when test="string-length($text) <= $first-line-length">
|
||||
<xsl:value-of select="concat($text, ' ')" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="break-pos">
|
||||
<xsl:call-template name="ws-search">
|
||||
<xsl:with-param name="text" select="$text" />
|
||||
<xsl:with-param name="start" select="$first-line-length+1" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="substring($text, 1, $break-pos - 1)" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="line-wrap">
|
||||
<xsl:with-param name="line-length" select="$line-length" />
|
||||
<xsl:with-param
|
||||
name="text" select="concat(' ', substring($text, $break-pos+1))"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="ws-search">
|
||||
<xsl:param name="text"/> <!-- required -->
|
||||
<xsl:param name="start"/> <!-- required -->
|
||||
<xsl:variable name="search-text" select="substring($text, $start)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(contains($search-text, ' '))">
|
||||
<xsl:value-of select="string-length($text)+1" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of
|
||||
select="$start + string-length(substring-before($search-text, ' '))"
|
||||
/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,745 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||
|
||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Wojciech Polak <polak@gnu.org>.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:bison="http://www.gnu.org/software/bison/">
|
||||
|
||||
<xsl:import href="bison.xsl"/>
|
||||
|
||||
<xsl:output method="xml" encoding="UTF-8"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="bison-xml-report/filename"/>
|
||||
<xsl:text> - GNU Bison XML Automaton Report</xsl:text>
|
||||
</title>
|
||||
<style type="text/css"><![CDATA[
|
||||
body {
|
||||
font-family: "Nimbus Sans L", Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
}
|
||||
a:link {
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:visited {
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: red;
|
||||
}
|
||||
#menu a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.i {
|
||||
font-style: italic;
|
||||
}
|
||||
.pre {
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
ol.decimal {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.lower-alpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
.point {
|
||||
color: #cc0000;
|
||||
}
|
||||
#footer {
|
||||
margin-top: 3.5em;
|
||||
font-size: 7pt;
|
||||
}
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates select="bison-xml-report"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<div id="footer"><hr />This document was generated using
|
||||
<a href="http://www.gnu.org/software/bison/" title="GNU Bison">
|
||||
GNU Bison <xsl:value-of select="/bison-xml-report/@version"/></a>
|
||||
XML Automaton Report.<br />
|
||||
<!-- default copying notice -->
|
||||
Verbatim copying and distribution of this entire page is
|
||||
permitted in any medium, provided this notice is preserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bison-xml-report">
|
||||
<h1>GNU Bison XML Automaton Report</h1>
|
||||
<p>
|
||||
input grammar: <span class="i"><xsl:value-of select="filename"/></span>
|
||||
</p>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
<h3>Table of Contents</h3>
|
||||
<ul id="menu">
|
||||
<li>
|
||||
<a href="#reductions">Reductions</a>
|
||||
<ul class="lower-alpha">
|
||||
<li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li>
|
||||
<li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li>
|
||||
<li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li>
|
||||
<xsl:if test="grammar/rules/rule[@usefulness='useless-in-parser']">
|
||||
<li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#conflicts">Conflicts</a></li>
|
||||
<li>
|
||||
<a href="#grammar">Grammar</a>
|
||||
<ul class="lower-alpha">
|
||||
<li><a href="#grammar">Itemset</a></li>
|
||||
<li><a href="#terminals">Terminal symbols</a></li>
|
||||
<li><a href="#nonterminals">Nonterminal symbols</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#automaton">Automaton</a></li>
|
||||
</ul>
|
||||
<xsl:apply-templates select="grammar" mode="reductions"/>
|
||||
<xsl:apply-templates select="grammar" mode="useless-in-parser"/>
|
||||
<xsl:apply-templates select="automaton" mode="conflicts"/>
|
||||
<xsl:apply-templates select="grammar"/>
|
||||
<xsl:apply-templates select="automaton"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar" mode="reductions">
|
||||
<h2>
|
||||
<a name="reductions"/>
|
||||
<xsl:text> Reductions</xsl:text>
|
||||
</h2>
|
||||
<xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
|
||||
<xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
|
||||
<xsl:apply-templates select="rules" mode="useless-in-grammar"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="nonterminals" mode="useless-in-grammar">
|
||||
<h3>
|
||||
<a name="nonterminals_useless_in_grammar"/>
|
||||
<xsl:text> Nonterminals useless in grammar</xsl:text>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<p class="pre">
|
||||
<xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="terminals" mode="unused-in-grammar">
|
||||
<h3>
|
||||
<a name="terminals_unused_in_grammar"/>
|
||||
<xsl:text> Terminals unused in grammar</xsl:text>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="terminal[@usefulness='unused-in-grammar']">
|
||||
<p class="pre">
|
||||
<xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
|
||||
<xsl:sort select="@symbol-number" data-type="number"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rules" mode="useless-in-grammar">
|
||||
<h3>
|
||||
<a name="rules_useless_in_grammar"/>
|
||||
<xsl:text> Rules useless in grammar</xsl:text>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
|
||||
<xsl:if test="$set">
|
||||
<p class="pre">
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param name="rule-set" select="$set"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar" mode="useless-in-parser">
|
||||
<xsl:variable
|
||||
name="set" select="rules/rule[@usefulness='useless-in-parser']"
|
||||
/>
|
||||
<xsl:if test="$set">
|
||||
<h2>
|
||||
<a name="rules_useless_in_parser"/>
|
||||
<xsl:text> Rules useless in parser due to conflicts</xsl:text>
|
||||
</h2>
|
||||
<xsl:text> </xsl:text>
|
||||
<p class="pre">
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param name="rule-set" select="$set"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar">
|
||||
<h2>
|
||||
<a name="grammar"/>
|
||||
<xsl:text> Grammar</xsl:text>
|
||||
</h2>
|
||||
<xsl:text> </xsl:text>
|
||||
<p class="pre">
|
||||
<xsl:call-template name="style-rule-set">
|
||||
<xsl:with-param
|
||||
name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
|
||||
/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="terminals"/>
|
||||
<xsl:apply-templates select="nonterminals"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="style-rule-set">
|
||||
<xsl:param name="rule-set"/>
|
||||
<xsl:for-each select="$rule-set">
|
||||
<xsl:apply-templates select=".">
|
||||
<xsl:with-param name="pad" select="'3'"/>
|
||||
<xsl:with-param name="prev-lhs">
|
||||
<xsl:if test="position()>1">
|
||||
<xsl:variable name="position" select="position()"/>
|
||||
<xsl:value-of select="$rule-set[$position - 1]/lhs"/>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton" mode="conflicts">
|
||||
<h2>
|
||||
<a name="conflicts"/>
|
||||
<xsl:text> Conflicts</xsl:text>
|
||||
</h2>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:variable name="conflict-report">
|
||||
<xsl:apply-templates select="state" mode="conflicts"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="string-length($conflict-report) != 0">
|
||||
<p class="pre">
|
||||
<xsl:copy-of select="$conflict-report"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="state" mode="conflicts">
|
||||
<xsl:variable name="conflict-counts">
|
||||
<xsl:apply-templates select="." mode="bison:count-conflicts" />
|
||||
</xsl:variable>
|
||||
<xsl:variable
|
||||
name="sr-count" select="substring-before($conflict-counts, ',')"
|
||||
/>
|
||||
<xsl:variable
|
||||
name="rr-count" select="substring-after($conflict-counts, ',')"
|
||||
/>
|
||||
<xsl:if test="$sr-count > 0 or $rr-count > 0">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @number)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('State ', @number)"/>
|
||||
</a>
|
||||
<xsl:text> conflicts:</xsl:text>
|
||||
<xsl:if test="$sr-count > 0">
|
||||
<xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
|
||||
<xsl:if test="$rr-count > 0">
|
||||
<xsl:value-of select="(',')"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="$rr-count > 0">
|
||||
<xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="' '"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar/terminals">
|
||||
<h3>
|
||||
<a name="terminals"/>
|
||||
<xsl:text> Terminals, with rules where they appear</xsl:text>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<p class="pre">
|
||||
<xsl:apply-templates select="terminal"/>
|
||||
</p>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="grammar/nonterminals">
|
||||
<h3>
|
||||
<a name="nonterminals"/>
|
||||
<xsl:text> Nonterminals, with rules where they appear</xsl:text>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<p class="pre">
|
||||
<xsl:apply-templates
|
||||
select="nonterminal[@usefulness!='useless-in-grammar']"
|
||||
/>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="terminal">
|
||||
<b><xsl:value-of select="@name"/></b>
|
||||
<xsl:value-of select="concat(' (', @token-number, ')')"/>
|
||||
<xsl:for-each select="key('bison:ruleByRhs', @name)">
|
||||
<xsl:apply-templates select="." mode="number-link"/>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="nonterminal">
|
||||
<b><xsl:value-of select="@name"/></b>
|
||||
<xsl:value-of select="concat(' (', @symbol-number, ')')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="key('bison:ruleByLhs', @name)">
|
||||
<xsl:text>on left:</xsl:text>
|
||||
<xsl:for-each select="key('bison:ruleByLhs', @name)">
|
||||
<xsl:apply-templates select="." mode="number-link"/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="key('bison:ruleByRhs', @name)">
|
||||
<xsl:if test="key('bison:ruleByLhs', @name)">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>on right:</xsl:text>
|
||||
<xsl:for-each select="key('bison:ruleByRhs', @name)">
|
||||
<xsl:apply-templates select="." mode="number-link"/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rule" mode="number-link">
|
||||
<xsl:text> </xsl:text>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@number"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton">
|
||||
<h2>
|
||||
<a name="automaton"/>
|
||||
<xsl:text> Automaton</xsl:text>
|
||||
</h2>
|
||||
<xsl:apply-templates select="state">
|
||||
<xsl:with-param name="pad" select="'3'"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="automaton/state">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<h3>
|
||||
<a>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="concat('state_', @number)"/>
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
<xsl:text>state </xsl:text>
|
||||
<xsl:value-of select="@number"/>
|
||||
</h3>
|
||||
<xsl:text> </xsl:text>
|
||||
<p class="pre">
|
||||
<xsl:apply-templates select="itemset/item">
|
||||
<xsl:with-param name="pad" select="$pad"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="actions/transitions">
|
||||
<xsl:with-param name="type" select="'shift'"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="actions/errors"/>
|
||||
<xsl:apply-templates select="actions/reductions"/>
|
||||
<xsl:apply-templates select="actions/transitions">
|
||||
<xsl:with-param name="type" select="'goto'"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="solved-conflicts"/>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/transitions">
|
||||
<xsl:param name="type"/>
|
||||
<xsl:if test="transition[@type = $type]">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="transition[@type = $type]">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/errors">
|
||||
<xsl:if test="error">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="error">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="actions/reductions">
|
||||
<xsl:if test="reduction">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="reduction">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates
|
||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||
>
|
||||
<xsl:with-param name="itemset" select="'true'"/>
|
||||
<xsl:with-param name="pad" select="$pad"/>
|
||||
<xsl:with-param name="prev-lhs"
|
||||
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
|
||||
/>
|
||||
<xsl:with-param name="point" select="@point"/>
|
||||
<xsl:with-param name="lookaheads">
|
||||
<xsl:apply-templates select="lookaheads"/>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rule">
|
||||
<xsl:param name="itemset"/>
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-lhs"/>
|
||||
<xsl:param name="point"/>
|
||||
<xsl:param name="lookaheads"/>
|
||||
|
||||
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$itemset != 'true'">
|
||||
<a>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="concat('rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset = 'true'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- LHS -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="i">
|
||||
<xsl:value-of select="lhs"/>
|
||||
</span>
|
||||
<xsl:text> →</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- RHS -->
|
||||
<xsl:for-each select="rhs/*">
|
||||
<xsl:if test="position() = $point + 1">
|
||||
<xsl:text> </xsl:text>
|
||||
<span class="point">.</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="$itemset = 'true' and name(.) != 'empty'">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$itemset != 'true'">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:if>
|
||||
<xsl:if test="position() = last() and position() = $point">
|
||||
<xsl:text> </xsl:text>
|
||||
<span class="point">.</span>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="$lookaheads">
|
||||
<xsl:value-of select="$lookaheads"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="name(key('bison:symbolByName', .)) = 'nonterminal'">
|
||||
<span class="i"><xsl:value-of select="."/></span>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<b><xsl:value-of select="."/></b>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="empty">
|
||||
<xsl:text> ε</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lookaheads">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:apply-templates select="symbol"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lookaheads/symbol">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="transition">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('shift, and go to state ', @state)"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'goto'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('go to state ', @state)"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="error">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>error</xsl:text>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="text()"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="reduction">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="rpad">
|
||||
<xsl:with-param name="str" select="string(@symbol)"/>
|
||||
<xsl:with-param name="pad" select="number($pad) + 2"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="@enabled = 'false'">
|
||||
<xsl:text>[</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@rule = 'accept'">
|
||||
<xsl:text>accept</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @rule)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('reduce using rule ', @rule)"/>
|
||||
</a>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"
|
||||
/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@enabled = 'false'">
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="solved-conflicts">
|
||||
<xsl:if test="resolution">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="resolution"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resolution">
|
||||
<xsl:text> Conflict between </xsl:text>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @rule)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('rule ',@rule)"/>
|
||||
</a>
|
||||
<xsl:text> and token </xsl:text>
|
||||
<xsl:value-of select="@symbol"/>
|
||||
<xsl:text> resolved as </xsl:text>
|
||||
<xsl:if test="@type = 'error'">
|
||||
<xsl:text>an </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@type"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>). </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="max-width-symbol">
|
||||
<xsl:param name="node"/>
|
||||
<xsl:variable name="longest">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||
order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="$longest"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="lpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="rpad">
|
||||
<xsl:param name="str" select="''"/>
|
||||
<xsl:param name="pad" select="0"/>
|
||||
<xsl:variable name="diff" select="$pad - string-length($str)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$diff < 0">
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="space">
|
||||
<xsl:param name="repeat">0</xsl:param>
|
||||
<xsl:param name="fill" select="' '"/>
|
||||
<xsl:if test="number($repeat) >= 1">
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$repeat - 1"/>
|
||||
<xsl:with-param name="fill" select="$fill"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$fill"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,2 @@
|
|||
#! /bin/sh
|
||||
exec 'c:/progra~1/bison/bin/bison' -y "$@"
|
|
@ -0,0 +1,54 @@
|
|||
* Bison-2.4.1 for Windows *
|
||||
===========================
|
||||
|
||||
What is it?
|
||||
-----------
|
||||
Bison: Yacc-compatible parser generator
|
||||
|
||||
Description
|
||||
-----------
|
||||
Bison is a general purpose parser generator that converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar. Bison can be used to develop a wide range of language parsers, from ones used in simple desk calculators to complex programming languages. Bison is upwardly compatible with Yacc, so any correctly written Yacc grammar should work with Bison without any changes. If you know Yacc, you shouldn't have any trouble using Bison. You do need to be very proficient in C programming to be able to use Bison. Bison is only needed on systems that are used for development. If your system will be used for C development, you should install Bison. The package contains also the -ly library sometimes used by programs using Bison-generated parsers. If you are developing programs using Bison, you might want to link with this library. This library is not required by all Bison-generated parsers, but may be employed by simple programs to supply minimal support for the generated parsers.
|
||||
|
||||
Homepage
|
||||
--------
|
||||
http://www.gnu.org/software/bison/bison.html
|
||||
Sources: http://ftp.gnu.org/gnu/bison/bison-2.4.1.tar.gz
|
||||
|
||||
System
|
||||
------
|
||||
- Win32, i.e. MS-Windows 95 / 98 / ME / NT / 2000 / XP / 2003 / Vista / 2008 with msvcrt.dll
|
||||
- if msvcrt.dll is not in your Windows/System folder, get it from
|
||||
Microsoft <http://support.microsoft.com/kb/259403>
|
||||
or by installing Internet Explorer 4.0 or higher
|
||||
<http://www.microsoft.com/windows/ie>
|
||||
- libintl-3 <http://gnuwin32.sourceforge.net/packages/libintl.htm>
|
||||
- libiconv-2 <http://gnuwin32.sourceforge.net/packages/libiconv.htm>
|
||||
- regex <http://gnuwin32.sourceforge.net/packages/regex.htm>
|
||||
- m4 <http://gnuwin32.sourceforge.net/packages/m4.htm>
|
||||
|
||||
Notes
|
||||
-----
|
||||
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
|
||||
|
||||
Package Availability
|
||||
--------------------
|
||||
- in: http://gnuwin32.sourceforge.net
|
||||
Installation
|
||||
------------
|
||||
Bison may be installed in any directory, provided the subdirectory structure is maintained. Native language support is also active.
|
||||
|
||||
Sources
|
||||
-------
|
||||
- bison-2.4.1-src.zip
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
The package has been compiled with GNU auto-tools, GNU make, and Mingw
|
||||
(GCC for MS-Windows). Any differences from the original sources are given
|
||||
in bison-2.4.1-GnuWin32.diffs in bison-2.4.1-src.zip. Libraries needed
|
||||
for compilation can be found at the lines starting with 'LIBS = ' in the
|
||||
Makefiles. Usually, these are standard libraries provided with Mingw, or
|
||||
libraries from the package itself; 'gw32c' refers to the libgw32c package,
|
||||
which provides MS-Windows substitutes or stubs for functions normally found in
|
||||
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
|
||||
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,8 @@
|
|||
Authors of GNU Bison.
|
||||
|
||||
Bison was written primarily by Robert Corbett.
|
||||
|
||||
Richard Stallman made it Yacc-compatible.
|
||||
|
||||
Wilfred Hansen of Carnegie Mellon University added multicharacter
|
||||
string literals and other features.
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,291 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *Note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,43 @@
|
|||
This package contains the GNU Bison parser generator.
|
||||
|
||||
See the file INSTALL for generic compilation and installation instructions.
|
||||
|
||||
See the section FAQ in the documentation (doc/bison.info) for
|
||||
frequently asked questions. The documentation is also available in
|
||||
PDF and HTML, provided you have a recent version of Texinfo installed:
|
||||
run "make pdf" or "make html".
|
||||
|
||||
Bison requires GNU m4 1.4.6 or later. See:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||
|
||||
Bison can work with pre-1.4.6 distributions of GNU m4 if they are
|
||||
sufficiently patched, but if you encounter a bug with an older
|
||||
distribution and report a bug we will probably suggest that you
|
||||
upgrade to 1.4.6 as the first step in trying to fix it.
|
||||
|
||||
Please send bug reports to <bug-bison@gnu.org>. Please include the
|
||||
version number from `bison --version', and a complete, self-contained
|
||||
test case in each bug report.
|
||||
|
||||
If you have questions about using Bison and the documentation does
|
||||
not answer them, please send mail to <help-bison@gnu.org>.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,30 @@
|
|||
-*- text -*-
|
||||
|
||||
This is a test release of this package. Using it more or less
|
||||
implicitly signs you up to help us find whatever problems you report.
|
||||
|
||||
The documentation still needs more work. Suggestions welcome.
|
||||
Patches even more welcome.
|
||||
|
||||
Please send comments and problem reports about this test release to
|
||||
<bug-bison@gnu.org>. This program will get better only if you report
|
||||
the problems you encounter.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,104 @@
|
|||
Bison was originally written by Robert Corbett. It would not be what
|
||||
it is today without the invaluable help of these people:
|
||||
|
||||
Airy Andre Airy.Andre@edf.fr
|
||||
Akim Demaille akim@freefriends.org
|
||||
Albert Chin-A-Young china@thewrittenword.com
|
||||
Alexander Belopolsky alexb@rentec.com
|
||||
Alexandre Duret-Lutz adl@src.lip6.fr
|
||||
Andreas Schwab schwab@suse.de
|
||||
Andrew Suffield asuffield@users.sourceforge.net
|
||||
Anthony Heading ajrh@ajrh.net
|
||||
Arnold Robbins arnold@skeeve.com
|
||||
Art Haas ahaas@neosoft.com
|
||||
Baron Schwartz baron@sequent.org
|
||||
Benoit Perrot benoit.perrot@epita.fr
|
||||
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
|
||||
Bob Rossi bob@brasko.net
|
||||
Brandon Lucia blucia@gmail.com
|
||||
Bruce Lilly blilly@erols.com
|
||||
Bruno Haible bruno@clisp.org
|
||||
Charles-Henri de Boysson de-boy_c@epita.fr
|
||||
Christian Burger cburger@sunysb.edu
|
||||
Cris Bailiff c.bailiff+bison@awayweb.com
|
||||
Cris van Pelt cris@amf03054.office.wxs.nl
|
||||
Csaba Raduly csaba_22@yahoo.co.uk
|
||||
Daniel Hagerty hag@gnu.org
|
||||
David J. MacKenzie djm@gnu.org
|
||||
Derek M. Jones derek@knosof.co.uk
|
||||
Di-an Jan dianj@freeshell.org
|
||||
Dick Streefland dick.streefland@altium.nl
|
||||
Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de
|
||||
Eric Blake ebb9@byu.net
|
||||
Evgeny Stambulchik fnevgeny@plasma-gate.weizmann.ac.il
|
||||
Fabrice Bauzac noon@cote-dazur.com
|
||||
Florian Krohm florian@edamail.fishkill.ibm.com
|
||||
Frank Heckenbach frank@g-n-u.de
|
||||
Frans Englich frans.englich@telia.com
|
||||
Georg Sauthoff gsauthof@TechFak.Uni-Bielefeld.DE
|
||||
Goran Uddeborg goeran@uddeborg.se
|
||||
Guido Trentalancia trentalg@aston.ac.uk
|
||||
H. Merijn Brand h.m.brand@hccnet.nl
|
||||
Hans Aberg haberg@matematik.su.se
|
||||
Jan Nieuwenhuizen janneke@gnu.org
|
||||
Jesse Thilo jthilo@gnu.org
|
||||
Jim Kent jkent@arch.sel.sony.com
|
||||
Jim Meyering jim@meyering.net
|
||||
Joel E. Denny jdenny@ces.clemson.edu
|
||||
Juan Manuel Guerrero juan.guerrero@gmx.de
|
||||
Kees Zeelenberg kzlg@users.sourceforge.net
|
||||
Keith Browne kbrowne@legato.com
|
||||
Laurent Mascherpa laurent.mascherpa@epita.fr
|
||||
Magnus Fromreide magfr@lysator.liu.se
|
||||
Marc Autret autret_m@epita.fr
|
||||
Martin Mokrejs mmokrejs@natur.cuni.cz
|
||||
Martin Nylin martin.nylin@linuxmail.org
|
||||
Matt Kraai kraai@alumni.cmu.edu
|
||||
Matt Rosing rosing@peakfive.com
|
||||
Michael Hayes m.hayes@elec.canterbury.ac.nz
|
||||
Mickael Labau labau_m@epita.fr
|
||||
Mike Castle dalgoda@ix.netcom.com
|
||||
Neil Booth NeilB@earthling.net
|
||||
Nelson H. F. Beebe beebe@math.utah.edu
|
||||
Nicolas Burrus nicolas.burrus@epita.fr
|
||||
Nicolas Tisserand nicolas.tisserand@epita.fr
|
||||
Noah Friedman friedman@gnu.org
|
||||
Oleg Smolsky oleg.smolsky@pacific-simulators.co.nz
|
||||
Paolo Bonzini bonzini@gnu.org
|
||||
Pascal Bart pascal.bart@epita.fr
|
||||
Paul Eggert eggert@cs.ucla.edu
|
||||
Paul Hilfinger Hilfinger@CS.Berkeley.EDU
|
||||
Per Allansson per@appgate.com
|
||||
Peter Fales psfales@lucent.com
|
||||
Peter Hamorsky hamo@upjs.sk
|
||||
Piotr Gackiewicz gacek@intertel.com.pl
|
||||
Quoc Peyrot chojin@lrde.epita.fr
|
||||
R Blake blakers@mac.com
|
||||
Raja R Harinath harinath@cs.umn.edu
|
||||
Richard Stallman rms@gnu.org
|
||||
Robert Anisko anisko_r@epita.fr
|
||||
Satya Kiran Popuri satyakiran@gmail.com
|
||||
Sebastien Fricker sebastien.fricker@gmail.com
|
||||
Sebastian Setzer sebastian.setzer.ext@siemens.com
|
||||
Sergei Steshenko sergstesh@yahoo.com
|
||||
Shura debil_urod@ngs.ru
|
||||
Steve Murphy murf@parsetree.com
|
||||
Tim Josling tej@melbpc.org.au
|
||||
Tim Van Holder tim.van.holder@pandora.be
|
||||
Tom Lane tgl@sss.pgh.pa.us
|
||||
Tom Tromey tromey@cygnus.com
|
||||
Tommy Nordgren tommy.nordgren@chello.se
|
||||
Troy A. Johnson troyj@ecn.purdue.edu
|
||||
Tys Lefering twlevo@xs4all.nl
|
||||
Vin Shelton acs@alumni.princeton.edu
|
||||
Wayne Green wayne@infosavvy.com
|
||||
Wolfram Wagner ww@mpi-sb.mpg.de
|
||||
Wwp subscript@free.fr
|
||||
Zack Weinberg zack@codesourcery.com
|
||||
|
||||
Many people are not named here because we lost track of them. We
|
||||
thank them! Please, help us keeping this list up to date.
|
||||
|
||||
Local Variables:
|
||||
mode: text
|
||||
End:
|
|
@ -0,0 +1,309 @@
|
|||
-*- outline -*-
|
||||
|
||||
* Header guards
|
||||
|
||||
From Franc,ois: should we keep the directory part in the CPP guard?
|
||||
|
||||
|
||||
* Yacc.c: CPP Macros
|
||||
|
||||
Do some people use YYPURE, YYLSP_NEEDED like we do in the test suite?
|
||||
They should not: it is not documented. But if they need to, let's
|
||||
find something clean (not like YYLSP_NEEDED...).
|
||||
|
||||
|
||||
* Installation
|
||||
|
||||
* Documentation
|
||||
Before releasing, make sure the documentation ("Understanding your
|
||||
parser") refers to the current `output' format.
|
||||
|
||||
* lalr1.cc
|
||||
** vector
|
||||
Move to using vector, drop stack.hh.
|
||||
|
||||
** I18n
|
||||
Catch up with yacc.c.
|
||||
|
||||
* Report
|
||||
|
||||
** GLR
|
||||
How would Paul like to display the conflicted actions? In particular,
|
||||
what when two reductions are possible on a given lookahead token, but one is
|
||||
part of $default. Should we make the two reductions explicit, or just
|
||||
keep $default? See the following point.
|
||||
|
||||
** Disabled Reductions
|
||||
See `tests/conflicts.at (Defaulted Conflicted Reduction)', and decide
|
||||
what we want to do.
|
||||
|
||||
** Documentation
|
||||
Extend with error productions. The hard part will probably be finding
|
||||
the right rule so that a single state does not exhibit too many yet
|
||||
undocumented ``features''. Maybe an empty action ought to be
|
||||
presented too. Shall we try to make a single grammar with all these
|
||||
features, or should we have several very small grammars?
|
||||
|
||||
** --report=conflict-path
|
||||
Provide better assistance for understanding the conflicts by providing
|
||||
a sample text exhibiting the (LALR) ambiguity. See the paper from
|
||||
DeRemer and Penello: they already provide the algorithm.
|
||||
|
||||
** Statically check for potential ambiguities in GLR grammars. See
|
||||
<http://www.i3s.unice.fr/~schmitz/papers.html#expamb> for an approach.
|
||||
|
||||
|
||||
* Extensions
|
||||
|
||||
** Labeling the symbols
|
||||
Have a look at the Lemon parser generator: instead of $1, $2 etc. they
|
||||
can name the values. This is much more pleasant. For instance:
|
||||
|
||||
exp (res): exp (a) '+' exp (b) { $res = $a + $b; };
|
||||
|
||||
I love this. I have been bitten too often by the removal of the
|
||||
symbol, and forgetting to shift all the $n to $n-1. If you are
|
||||
unlucky, it compiles...
|
||||
|
||||
But instead of using $a etc., we can use regular variables. And
|
||||
instead of using (), I propose to use `:' (again). Paul suggests
|
||||
supporting `->' in addition to `:' to separate LHS and RHS. In other
|
||||
words:
|
||||
|
||||
r:exp -> a:exp '+' b:exp { r = a + b; };
|
||||
|
||||
That requires an significant improvement of the grammar parser. Using
|
||||
GLR would be nice. It also requires that Bison know the type of the
|
||||
symbols (which will be useful for %include anyway). So we have some
|
||||
time before...
|
||||
|
||||
Note that there remains the problem of locations: `@r'?
|
||||
|
||||
|
||||
** $-1
|
||||
We should find a means to provide an access to values deep in the
|
||||
stack. For instance, instead of
|
||||
|
||||
baz: qux { $$ = $<foo>-1 + $<bar>0 + $1; }
|
||||
|
||||
we should be able to have:
|
||||
|
||||
foo($foo) bar($bar) baz($bar): qux($qux) { $baz = $foo + $bar + $qux; }
|
||||
|
||||
Or something like this.
|
||||
|
||||
** %if and the like
|
||||
It should be possible to have %if/%else/%endif. The implementation is
|
||||
not clear: should it be lexical or syntactic. Vadim Maslow thinks it
|
||||
must be in the scanner: we must not parse what is in a switched off
|
||||
part of %if. Akim Demaille thinks it should be in the parser, so as
|
||||
to avoid falling into another CPP mistake.
|
||||
|
||||
** -D, --define-muscle NAME=VALUE
|
||||
To define muscles via cli. Or maybe support directly NAME=VALUE?
|
||||
|
||||
** XML Output
|
||||
There are couple of available extensions of Bison targeting some XML
|
||||
output. Some day we should consider including them. One issue is
|
||||
that they seem to be quite orthogonal to the parsing technique, and
|
||||
seem to depend mostly on the possibility to have some code triggered
|
||||
for each reduction. As a matter of fact, such hooks could also be
|
||||
used to generate the yydebug traces. Some generic scheme probably
|
||||
exists in there.
|
||||
|
||||
XML output for GNU Bison and gcc
|
||||
http://www.cs.may.ie/~jpower/Research/bisonXML/
|
||||
|
||||
XML output for GNU Bison
|
||||
http://yaxx.sourceforge.net/
|
||||
|
||||
* Unit rules
|
||||
Maybe we could expand unit rules, i.e., transform
|
||||
|
||||
exp: arith | bool;
|
||||
arith: exp '+' exp;
|
||||
bool: exp '&' exp;
|
||||
|
||||
into
|
||||
|
||||
exp: exp '+' exp | exp '&' exp;
|
||||
|
||||
when there are no actions. This can significantly speed up some
|
||||
grammars. I can't find the papers. In particular the book `LR
|
||||
parsing: Theory and Practice' is impossible to find, but according to
|
||||
`Parsing Techniques: a Practical Guide', it includes information about
|
||||
this issue. Does anybody have it?
|
||||
|
||||
|
||||
|
||||
* Documentation
|
||||
|
||||
** History/Bibliography
|
||||
Some history of Bison and some bibliography would be most welcome.
|
||||
Are there any Texinfo standards for bibliography?
|
||||
|
||||
|
||||
|
||||
* Java, Fortran, etc.
|
||||
|
||||
|
||||
* Coding system independence
|
||||
Paul notes:
|
||||
|
||||
Currently Bison assumes 8-bit bytes (i.e. that UCHAR_MAX is
|
||||
255). It also assumes that the 8-bit character encoding is
|
||||
the same for the invocation of 'bison' as it is for the
|
||||
invocation of 'cc', but this is not necessarily true when
|
||||
people run bison on an ASCII host and then use cc on an EBCDIC
|
||||
host. I don't think these topics are worth our time
|
||||
addressing (unless we find a gung-ho volunteer for EBCDIC or
|
||||
PDP-10 ports :-) but they should probably be documented
|
||||
somewhere.
|
||||
|
||||
More importantly, Bison does not currently allow NUL bytes in
|
||||
tokens, either via escapes (e.g., "x\0y") or via a NUL byte in
|
||||
the source code. This should get fixed.
|
||||
|
||||
* --graph
|
||||
Show reductions.
|
||||
|
||||
* Broken options ?
|
||||
** %token-table
|
||||
** Skeleton strategy
|
||||
Must we keep %token-table?
|
||||
|
||||
* src/print_graph.c
|
||||
Find the best graph parameters.
|
||||
|
||||
* BTYacc
|
||||
See if we can integrate backtracking in Bison. Charles-Henri de
|
||||
Boysson <de-boy_c@epita.fr> is working on this, and already has some
|
||||
results. Vadim Maslow, the maintainer of BTYacc was contacted, and we
|
||||
stay in touch with him. Adjusting the Bison grammar parser will be
|
||||
needed to support some extra BTYacc features. This is less urgent.
|
||||
|
||||
** Keeping the conflicted actions
|
||||
First, analyze the differences between byacc and btyacc (I'm referring
|
||||
to the executables). Find where the conflicts are preserved.
|
||||
|
||||
** Compare with the GLR tables
|
||||
See how isomorphic the way BTYacc and the way the GLR adjustments in
|
||||
Bison are compatible. *As much as possible* one should try to use the
|
||||
same implementation in the Bison executables. I insist: it should be
|
||||
very feasible to use the very same conflict tables.
|
||||
|
||||
** Adjust the skeletons
|
||||
Import the skeletons for C and C++.
|
||||
|
||||
** Improve the skeletons
|
||||
Have them support yysymprint, yydestruct and so forth.
|
||||
|
||||
|
||||
* Precedence
|
||||
|
||||
** Partial order
|
||||
It is unfortunate that there is a total order for precedence. It
|
||||
makes it impossible to have modular precedence information. We should
|
||||
move to partial orders (sounds like series/parallel orders to me).
|
||||
|
||||
** Correlation b/w precedence and associativity
|
||||
Also, I fail to understand why we have to assign the same
|
||||
associativity to operators with the same precedence. For instance,
|
||||
why can't I decide that the precedence of * and / is the same, but the
|
||||
latter is nonassoc?
|
||||
|
||||
If there is really no profound motivation, we should find a new syntax
|
||||
to allow specifying this.
|
||||
|
||||
** RR conflicts
|
||||
See if we can use precedence between rules to solve RR conflicts. See
|
||||
what POSIX says.
|
||||
|
||||
|
||||
* $undefined
|
||||
From Hans:
|
||||
- If the Bison generated parser experiences an undefined number in the
|
||||
character range, that character is written out in diagnostic messages, an
|
||||
addition to the $undefined value.
|
||||
|
||||
Suggest: Change the name $undefined to undefined; looks better in outputs.
|
||||
|
||||
|
||||
* Default Action
|
||||
From Hans:
|
||||
- For use with my C++ parser, I transported the "switch (yyn)" statement
|
||||
that Bison writes to the bison.simple skeleton file. This way, I can remove
|
||||
the current default rule $$ = $1 implementation, which causes a double
|
||||
assignment to $$ which may not be OK under C++, replacing it with a
|
||||
"default:" part within the switch statement.
|
||||
|
||||
Note that the default rule $$ = $1, when typed, is perfectly OK under C,
|
||||
but in the C++ implementation I made, this rule is different from
|
||||
$<type_name>$ = $<type_name>1. I therefore think that one should implement
|
||||
a Bison option where every typed default rule is explicitly written out
|
||||
(same typed ruled can of course be grouped together).
|
||||
|
||||
Note: Robert Anisko handles this. He knows how to do it.
|
||||
|
||||
|
||||
* Warnings
|
||||
It would be nice to have warning support. See how Autoconf handles
|
||||
them, it is fairly well described there. It would be very nice to
|
||||
implement this in such a way that other programs could use
|
||||
lib/warnings.[ch].
|
||||
|
||||
Don't work on this without first announcing you do, as I already have
|
||||
thought about it, and know many of the components that can be used to
|
||||
implement it.
|
||||
|
||||
|
||||
* Pre and post actions.
|
||||
From: Florian Krohm <florian@edamail.fishkill.ibm.com>
|
||||
Subject: YYACT_EPILOGUE
|
||||
To: bug-bison@gnu.org
|
||||
X-Sent: 1 week, 4 days, 14 hours, 38 minutes, 11 seconds ago
|
||||
|
||||
The other day I had the need for explicitly building the parse tree. I
|
||||
used %locations for that and defined YYLLOC_DEFAULT to call a function
|
||||
that returns the tree node for the production. Easy. But I also needed
|
||||
to assign the S-attribute to the tree node. That cannot be done in
|
||||
YYLLOC_DEFAULT, because it is invoked before the action is executed.
|
||||
The way I solved this was to define a macro YYACT_EPILOGUE that would
|
||||
be invoked after the action. For reasons of symmetry I also added
|
||||
YYACT_PROLOGUE. Although I had no use for that I can envision how it
|
||||
might come in handy for debugging purposes.
|
||||
All is needed is to add
|
||||
|
||||
#if YYLSP_NEEDED
|
||||
YYACT_EPILOGUE (yyval, (yyvsp - yylen), yylen, yyloc, (yylsp - yylen));
|
||||
#else
|
||||
YYACT_EPILOGUE (yyval, (yyvsp - yylen), yylen);
|
||||
#endif
|
||||
|
||||
at the proper place to bison.simple. Ditto for YYACT_PROLOGUE.
|
||||
|
||||
I was wondering what you think about adding YYACT_PROLOGUE/EPILOGUE
|
||||
to bison. If you're interested, I'll work on a patch.
|
||||
|
||||
* Better graphics
|
||||
Equip the parser with a means to create the (visual) parse tree.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,70 @@
|
|||
-*- outline -*-
|
||||
|
||||
This directory contains data needed by Bison.
|
||||
|
||||
* Skeletons
|
||||
Bison skeletons: the general shapes of the different parser kinds,
|
||||
that are specialized for specific grammars by the bison program.
|
||||
|
||||
Currently, the supported skeletons are:
|
||||
|
||||
- yacc.c
|
||||
It used to be named bison.simple: it corresponds to C Yacc
|
||||
compatible LALR(1) parsers.
|
||||
|
||||
- lalr1.cc
|
||||
Produces a C++ parser class.
|
||||
|
||||
- lalr1.java
|
||||
Produces a Java parser class.
|
||||
|
||||
- glr.c
|
||||
A Generalized LR C parser based on Bison's LALR(1) tables.
|
||||
|
||||
- glr.cc
|
||||
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
|
||||
|
||||
These skeletons are the only ones supported by the Bison team.
|
||||
Because the interface between skeletons and the bison program is not
|
||||
finished, *we are not bound to it*. In particular, Bison is not
|
||||
mature enough for us to consider that ``foreign skeletons'' are
|
||||
supported.
|
||||
|
||||
* m4sugar
|
||||
This directory contains M4sugar, sort of an extended library for M4,
|
||||
which is used by Bison to instantiate the skeletons.
|
||||
|
||||
* xslt
|
||||
This directory contains XSLT programs that transform Bison's XML output
|
||||
into various formats.
|
||||
|
||||
- bison.xsl
|
||||
A library of routines used by the other XSLT programs.
|
||||
|
||||
- xml2dot.xsl
|
||||
Conversion into GraphViz's dot format.
|
||||
|
||||
- xml2text.xsl
|
||||
Conversion into text.
|
||||
|
||||
- xml2xhtml.xsl
|
||||
Conversion into XHTML.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,195 @@
|
|||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
1.: DJGPP specific changes.
|
||||
=======================
|
||||
|
||||
The DJGPP port of Bison offers LFN and SFN support depending on which
|
||||
OS it is running. If LFN support is available or not is determinated at
|
||||
run time. If LFN support is available (DOS session under Win9X, Win2K,
|
||||
WinXP, etc.) the standard posix file name extensions will be used.
|
||||
These are: y.tab.c, y.tab.c++, y.tab.h, y.output, etc. If only SFN
|
||||
support is available (plain DOS), then the standard MSDOS short file
|
||||
names will be used. These are: y_tab.c, y_tab.h, y.out, etc.
|
||||
It should be noticed that this bison version needs the m4 program as
|
||||
back end to generate the parser file (y.tab.c etc.) from the skeleton
|
||||
files. This implies that m4 must always be installed to get bison
|
||||
working. m4 will use a couple of m4 scripts that will be installed in
|
||||
/dev/env/DJDIR/share/bison and shall not be removed.
|
||||
It should also be noticed that the skeleton files bison.simple and
|
||||
bison.hairy are no longer supported. This applies also to the environ-
|
||||
ment variables BISON_HAIRY and BISON_SIMPLE. Those variables are *no*
|
||||
longer honored at all.
|
||||
The kind of skeleton file bison.hairy is no longer supported at all.
|
||||
The skeleton file bison.simple is now called yacc.c and is an m4 script.
|
||||
The other two skeleton files supported by this bison version are glr.c
|
||||
and lalr1.cc. The first one is a generalized LR C parser based on
|
||||
Bison's LALR(1) tables and the second one is a experimental C++ parser
|
||||
class.
|
||||
As has been told before, bison uses m4 to generate the parser file.
|
||||
This is done by forking and using pipes for the IPC. MSDOS does not
|
||||
support this functionality so this has been reproduced in the usual
|
||||
way by redirecting stdin and stdout of bison and m4 to temporary files
|
||||
and processing these files in sequence.
|
||||
It should be noticed that due to the great amount of file names that do
|
||||
not cleanly map to 8.3 file names, you will need an OS with LFN support
|
||||
to configure and compile the sources. On Win98 this implies that the
|
||||
generation of numeric tails for 8.3 file name aliases must be enabled
|
||||
or the compilation will fail.
|
||||
|
||||
|
||||
Please **read** the docs.
|
||||
|
||||
|
||||
2.: Installing the binary package.
|
||||
==============================
|
||||
|
||||
2.1.: Copy the binary distribution into the top DJGPP installation directory,
|
||||
just unzip it preserving the directory structure running *ONE* of the
|
||||
following commands:
|
||||
unzip32 bsn@PACKAGE_VERSION@b.zip or
|
||||
djtarx bsn@PACKAGE_VERSION@b.zip or
|
||||
pkunzip -d bsn@PACKAGE_VERSION@b.zip
|
||||
|
||||
|
||||
|
||||
3.: Building the binaries from sources.
|
||||
===================================
|
||||
|
||||
3.1.: Create a temporary directory and copy the source package into the
|
||||
directory. If you download the source distribution from one of the
|
||||
DJGPP sites, just unzip it preserving the directory structure
|
||||
running *ONE* of the following commands:
|
||||
unzip32 bsn@PACKAGE_VERSION@s.zip or
|
||||
djtarx bsn@PACKAGE_VERSION@s.zip or
|
||||
pkunzip -d bsn@PACKAGE_VERSION@s.zip
|
||||
and proceed to the paragraph 3.3, below.
|
||||
|
||||
3.2.: Source distributions downloaded from one of the GNU FTP sites need
|
||||
some more work to unpack, if LFN support is not available. If LFN is
|
||||
available then you can extract the source files from the archive with
|
||||
any unzip program and proceed to the paragraph 3.3, below. Any file
|
||||
name issue will be handled by the the DJGPP configuration files.
|
||||
To unpack the source distribution on SFN systems, first, you MUST use
|
||||
the `djunpack' batch file to unzip the package. That is because some
|
||||
file names in the official distributions need to be changed to avoid
|
||||
problems on the various platforms supported by DJGPP.
|
||||
`djunpack' invokes the `djtar' program (that is part of the basic DJGPP
|
||||
development kit) to rename these files on the fly given a file with
|
||||
name mappings; the distribution includes a file `djgpp/fnchange.lst'
|
||||
with the necessary mappings. So you need first to retrieve that batch
|
||||
file, and then invoke it to unpack the distribution. Here's how:
|
||||
|
||||
djtar -x -p -o bison-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar.gz > djunpack.bat
|
||||
djunpack bison-@VERSION@.tar.gz
|
||||
|
||||
(The name of the distribution archive and the leading directory of the
|
||||
path to `djunpack.bat' in the distribution will be different for
|
||||
versions of Bison other than @VERSION@.)
|
||||
|
||||
If the argument to `djunpack.bat' include leading directories, it MUST
|
||||
be given with the DOS-style backslashes; Unix-style forward slashes
|
||||
will NOT work.
|
||||
|
||||
If the distribution comes as a .tar.bz2 archive, and your version of
|
||||
`djtar' doesn't support bzip2 decompression, you need to unpack it as
|
||||
follows:
|
||||
|
||||
bnzip2 bison-@VERSION@.tar.bz2
|
||||
djtar -x -p -o bison-@VERSION@/djgpp/djunpack.bat bison-@VERSION@.tar > djunpack.bat
|
||||
djunpack bison-@VERSION@.tar
|
||||
|
||||
3.3.: To build the binaries you will need the following binary packages:
|
||||
djdev203.zip (or a later but NOT a prior version)
|
||||
bsh204b.zip (or a later but NOT a prior version)
|
||||
gccNNNb.zip, gppNNN.zip, bnuNNNb.zip, makNNNb.zip, filNNNb.zip,
|
||||
perlNNNb.zip, shlNNNb.zip, txtNNNb.zip, txiNNNb.zip, grepNNNb.zip,
|
||||
sedNNNb.zip and m4NNN.zip
|
||||
|
||||
If you want to run the check you will need also:
|
||||
difNNNb.zip
|
||||
|
||||
NNN represents the latest version number of the binary packages. All
|
||||
this packages can be found in the /v2gnu directory of any
|
||||
ftp.delorie.com mirror.
|
||||
You will need bsh204b.zip or later and *NOT* a prior version or
|
||||
the build will fail. The same applies to djdev203.zip. Please note
|
||||
that Bison requires m4-144b.zip or later to work properly.
|
||||
|
||||
3.4.: If for some reason you want to reconfigure the package cd into the top
|
||||
srcdir (bison-@TREE_VERSION@) and run the following commands:
|
||||
del djgpp\config.cache
|
||||
make clean
|
||||
djgpp\config
|
||||
|
||||
Please note that you *MUST* delete the config.cache file in the djgpp
|
||||
subdir or you will not really reconfigure the sources because the
|
||||
configuration informations will be read from the cache file instead
|
||||
of being newly computed.
|
||||
To build the programs in a directory other than where the sources are,
|
||||
you must add the parameter that specifies the source directory,
|
||||
e.g:
|
||||
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
|
||||
|
||||
Lets assume you want to build the binaries in a directory placed on a
|
||||
different drive (z:\build in this case) from where the sources are,
|
||||
then you will run the following commands:
|
||||
z:
|
||||
md \build
|
||||
cd \build
|
||||
x:\src\gnu\bison-@TREE_VERSION@\djgpp\config x:/src/gnu/bison-@TREE_VERSION@
|
||||
|
||||
The order of the options and the srcdir option does not matter. You
|
||||
*MUST* use forward slashes to specify the source directory.
|
||||
|
||||
The batch file will set same environment variables, make MSDOS specific
|
||||
modifications to the Makefile.in's and supply all other needed options
|
||||
to the configure script.
|
||||
|
||||
3.5.: To compile the package run from the top srcdir the command:
|
||||
make
|
||||
|
||||
3.6.: Now you can run the tests if you like. From the top srcdir run the
|
||||
command:
|
||||
make check
|
||||
|
||||
No test should fail but the tests #131 (Doxygen Public Documentation)
|
||||
and #132 (Doxygen Private Documentation) will be skipped. Please note
|
||||
that the testsuite only works with LFN available. On plain DOS, most
|
||||
of the tests will fail due to invalid DOS names.
|
||||
|
||||
3.7.: To install the binaries, header, library, catalogs, and info docs
|
||||
run the following command from the top srcdir:
|
||||
make install
|
||||
|
||||
This will install the products into your DJGPP installation tree given
|
||||
by the default prefix "/dev/env/DJDIR". If you prefer to install them
|
||||
into some other directory you will have to set prefix to the appropiate
|
||||
value:
|
||||
make install prefix=z:/some/other/place
|
||||
|
||||
|
||||
|
||||
Send GNU bison specific bug reports to <bug-bison@gnu.org>.
|
||||
Send suggestions and bug reports concerning the DJGPP port to
|
||||
comp.os.msdos.djgpp or <djgpp@delorie.com>.
|
||||
|
||||
|
||||
Enjoy.
|
||||
|
||||
Guerrero, Juan Manuel <juan.guerrero@gmx.de>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,717 @@
|
|||
@c The GNU General Public License.
|
||||
@center Version 3, 29 June 2007
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@heading Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program---to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation,
|
||||
use the GNU General Public License for most of our software; it
|
||||
applies also to any other work released this way by its authors. You
|
||||
can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too,
|
||||
receive or can get the source code. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
@heading TERMS AND CONDITIONS
|
||||
|
||||
@enumerate 0
|
||||
@item Definitions.
|
||||
|
||||
``This License'' refers to version 3 of the GNU General Public License.
|
||||
|
||||
``Copyright'' also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
``The Program'' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as ``you''. ``Licensees'' and
|
||||
``recipients'' may be individuals or organizations.
|
||||
|
||||
To ``modify'' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a ``modified version'' of
|
||||
the earlier work or a work ``based on'' the earlier work.
|
||||
|
||||
A ``covered work'' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To ``propagate'' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To ``convey'' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays ``Appropriate Legal Notices'' to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
@item Source Code.
|
||||
|
||||
The ``source code'' for a work means the preferred form of the work for
|
||||
making modifications to it. ``Object code'' means any non-source form
|
||||
of a work.
|
||||
|
||||
A ``Standard Interface'' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The ``System Libraries'' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
``Major Component'', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The ``Corresponding Source'' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
@item Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
@item Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
@item Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
The work must carry prominent notices stating that you modified it,
|
||||
and giving a relevant date.
|
||||
|
||||
@item
|
||||
The work must carry prominent notices stating that it is released
|
||||
under this License and any conditions added under section 7. This
|
||||
requirement modifies the requirement in section 4 to ``keep intact all
|
||||
notices''.
|
||||
|
||||
@item
|
||||
You must license the entire work, as a whole, under this License to
|
||||
anyone who comes into possession of a copy. This License will
|
||||
therefore apply, along with any applicable section 7 additional terms,
|
||||
to the whole of the work, and all its parts, regardless of how they
|
||||
are packaged. This License gives no permission to license the work in
|
||||
any other way, but it does not invalidate such permission if you have
|
||||
separately received it.
|
||||
|
||||
@item
|
||||
If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your work
|
||||
need not make them do so.
|
||||
@end enumerate
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
``aggregate'' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
@item Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium customarily
|
||||
used for software interchange.
|
||||
|
||||
@item
|
||||
Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a written
|
||||
offer, valid for at least three years and valid for as long as you
|
||||
offer spare parts or customer support for that product model, to give
|
||||
anyone who possesses the object code either (1) a copy of the
|
||||
Corresponding Source for all the software in the product that is
|
||||
covered by this License, on a durable physical medium customarily used
|
||||
for software interchange, for a price no more than your reasonable
|
||||
cost of physically performing this conveying of source, or (2) access
|
||||
to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
@item
|
||||
Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is
|
||||
allowed only occasionally and noncommercially, and only if you
|
||||
received the object code with such an offer, in accord with subsection
|
||||
6b.
|
||||
|
||||
@item
|
||||
Convey the object code by offering access from a designated place
|
||||
(gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to copy
|
||||
the object code is a network server, the Corresponding Source may be
|
||||
on a different server (operated by you or a third party) that supports
|
||||
equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source.
|
||||
Regardless of what server hosts the Corresponding Source, you remain
|
||||
obligated to ensure that it is available for as long as needed to
|
||||
satisfy these requirements.
|
||||
|
||||
@item
|
||||
Convey the object code using peer-to-peer transmission, provided you
|
||||
inform other peers where the object code and Corresponding Source of
|
||||
the work are being offered to the general public at no charge under
|
||||
subsection 6d.
|
||||
|
||||
@end enumerate
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A ``User Product'' is either (1) a ``consumer product'', which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
``normally used'' refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
``Installation Information'' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
@item Additional Terms.
|
||||
|
||||
``Additional permissions'' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Disclaiming warranty or limiting liability differently from the terms
|
||||
of sections 15 and 16 of this License; or
|
||||
|
||||
@item
|
||||
Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices
|
||||
displayed by works containing it; or
|
||||
|
||||
@item
|
||||
Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
@item
|
||||
Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
@item
|
||||
Declining to grant rights under trademark law for use of some trade
|
||||
names, trademarks, or service marks; or
|
||||
|
||||
@item
|
||||
Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with
|
||||
contractual assumptions of liability to the recipient, for any
|
||||
liability that these contractual assumptions directly impose on those
|
||||
licensors and authors.
|
||||
@end enumerate
|
||||
|
||||
All other non-permissive additional terms are considered ``further
|
||||
restrictions'' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
@item Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
@item Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
@item Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An ``entity transaction'' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
@item Patents.
|
||||
|
||||
A ``contributor'' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's ``contributor version''.
|
||||
|
||||
A contributor's ``essential patent claims'' are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, ``control'' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a ``patent license'' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To ``grant'' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. ``Knowingly relying'' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is ``discriminatory'' if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
@item No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey
|
||||
a covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree
|
||||
to terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
@item Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
@item Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If
|
||||
the Program does not specify a version number of the GNU General
|
||||
Public License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
@item Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
@item Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
@item Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@heading END OF TERMS AND CONDITIONS
|
||||
|
||||
@heading How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the ``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
@smallexample
|
||||
@var{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) @var{year} @var{name of author}
|
||||
|
||||
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 @url{http://www.gnu.org/licenses/}.
|
||||
@end smallexample
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
@smallexample
|
||||
@var{program} Copyright (C) @var{year} @var{name of author}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type @samp{show c} for details.
|
||||
@end smallexample
|
||||
|
||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
||||
the appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an ``about box''.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
@url{http://www.gnu.org/licenses/}.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use
|
||||
the GNU Lesser General Public License instead of this License. But
|
||||
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
|
|
@ -0,0 +1,41 @@
|
|||
A directory of tools provided to people using CVS Bison. None of
|
||||
these is distributed.
|
||||
|
||||
* bench.pl
|
||||
A primitive Perl script to run benches. Currently its only bench is
|
||||
the usual calculator: it has a lightweight processing part (but not
|
||||
null), so it is really emphasizing the cost of the whole parsing
|
||||
(including scanning and I/O).
|
||||
|
||||
Set the envvars BISON and CC to the programs and flags you want to
|
||||
use. They default to bison and gcc. To run a non-installed bison
|
||||
from a tarball built in _build, I suggest the following.
|
||||
|
||||
BISON=_build/tests/bison CC='gcc -O2' ./bench.pl
|
||||
|
||||
(The _build/tests/bison wrapper makes sure that _build/src/bison will
|
||||
use the tarballs' skeletons, not those already installed as a
|
||||
straightforward use of _build/src/bison would.)
|
||||
|
||||
--
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
End:
|
|
@ -0,0 +1,422 @@
|
|||
make.exe check-recursive
|
||||
make[1]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
|
||||
Making check in build-aux
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/build-aux'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/build-aux'
|
||||
Making check in po
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/po'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/po'
|
||||
Making check in runtime-po
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/runtime-po'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/runtime-po'
|
||||
Making check in lib
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
make.exe check-recursive
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
make[4]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
make[4]: Nothing to be done for `check-am'.
|
||||
make[4]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/lib'
|
||||
Making check in data
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/data'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/data'
|
||||
Making check in src
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
|
||||
make.exe check-am
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
|
||||
make[3]: Nothing to be done for `check-am'.
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/src'
|
||||
Making check in doc
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/doc'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/doc'
|
||||
Making check in examples
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
|
||||
Making check in calc++
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make.exe check-am
|
||||
make[4]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make.exe calc++.exe
|
||||
make[5]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-scanner.o -MD -MP -MF .deps/calc++-scanner.Tpo -c -o calc++-scanner.o ../../../bison-2.4.1-src/examples/calc++/calc++-scanner.cc
|
||||
calc++-scanner.cc: In function `int yy_get_next_buffer()':
|
||||
calc++-scanner.cc:1218: warning: comparison between signed and unsigned integer expressions
|
||||
mv -f .deps/calc++-scanner.Tpo .deps/calc++-scanner.Po
|
||||
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++.o -MD -MP -MF .deps/calc++.Tpo -c -o calc++.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++.cc
|
||||
mv -f .deps/calc++.Tpo .deps/calc++.Po
|
||||
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-driver.o -MD -MP -MF .deps/calc++-driver.Tpo -c -o calc++-driver.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++-driver.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++-driver.cc
|
||||
mv -f .deps/calc++-driver.Tpo .deps/calc++-driver.Po
|
||||
g++ -I. -I../../../bison-2.4.1-src/examples/calc++ -D__USE_MINGW_ACCESS -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DENABLE_RELOCATABLE -DINSTALLPREFIX=\"c:/progra~1/bison\" -DINSTALLDIR=\"c:/progra~1/bison/bin\" -DEXEEXT=\".exe\" -DNO_XMALLOC -ID:/Progra~1/GnuWin32/include -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -MT calc++-parser.o -MD -MP -MF .deps/calc++-parser.Tpo -c -o calc++-parser.o `test -f '../../../bison-2.4.1-src/examples/calc++/calc++-parser.cc' || echo '../../../bison-2.4.1-src/examples/calc++/'`../../../bison-2.4.1-src/examples/calc++/calc++-parser.cc
|
||||
mv -f .deps/calc++-parser.Tpo .deps/calc++-parser.Po
|
||||
g++ -Wall -Wpointer-arith -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -ffast-math -fconserve-space -fno-rtti -D__STDC_LIMIT_MACROS -Wl,-s -Wl,--force-exe-suffix -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition -Wl,--enable-stdcall-fixup -LD:/Progra~1/GnuWin32/lib -o calc++.exe calc++-scanner.o calc++.o calc++-driver.o calc++-parser.o -Wl,-s -LD:/Progra~1/GnuWin32/lib -lintl -lwsock32 -lole32 -luuid -lmsvcp60
|
||||
make[5]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make.exe check-TESTS
|
||||
make[5]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
PASS: test
|
||||
==================
|
||||
All 1 tests passed
|
||||
==================
|
||||
make[5]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make[4]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples/calc++'
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
|
||||
make[3]: Nothing to be done for `check-am'.
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/examples'
|
||||
Making check in tests
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
make.exe bison
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
make[3]: `bison' is up to date.
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
make.exe check-local
|
||||
make[3]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
/bin/sh ../../bison-2.4.1-src/tests/testsuite
|
||||
## --------------------------- ##
|
||||
## GNU Bison 2.4.1 test suite. ##
|
||||
## --------------------------- ##
|
||||
|
||||
Input Processing.
|
||||
|
||||
1: Invalid $n and @n ok
|
||||
2: Type Clashes ok
|
||||
3: Unused values ok
|
||||
4: Unused values before symbol declarations ok
|
||||
5: Default %printer and %destructor redeclared ok
|
||||
6: Per-type %printer and %destructor redeclared ok
|
||||
7: Unused values with default %destructor ok
|
||||
8: Unused values with per-type %destructor ok
|
||||
9: Incompatible Aliases ok
|
||||
10: Torturing the Scanner ok
|
||||
11: Typed symbol aliases ok
|
||||
12: Require 1.0 ok
|
||||
13: Require 2.4.1 ok
|
||||
14: Require 100.0 ok
|
||||
15: String aliases for character tokens ok
|
||||
16: Unclosed constructs ok
|
||||
17: %start after first rule ok
|
||||
18: %prec takes a token ok
|
||||
19: Reject unused %code qualifiers ok
|
||||
20: %define errors ok
|
||||
21: %define Boolean variables ok
|
||||
22: %define enum variables ok
|
||||
23: Unused %define api.pure ok
|
||||
24: C++ namespace reference errors ok
|
||||
|
||||
Output file names.
|
||||
|
||||
25: Output files: -dv ok
|
||||
26: Output files: -dv >&- ok
|
||||
27: Output files: -dv -o foo.c ok
|
||||
28: Output files: -dv -o foo.tab.c ok
|
||||
29: Output files: -dv -y ok
|
||||
30: Output files: -dv -b bar ok
|
||||
31: Output files: -dv -g -o foo.c ok
|
||||
32: Output files: %defines %verbose ok
|
||||
33: Output files: %defines %verbose %yacc ok
|
||||
34: Output files: %defines %verbose %yacc ok
|
||||
35: Output files: %file-prefix "bar" %defines %verbose ok
|
||||
36: Output files: %output="bar.c" %defines %verbose %yacc ok
|
||||
37: Output files: %file-prefix="baz" %output "bar.c" %defines %verbose %yacc ok
|
||||
38: Output files: %defines %verbose ok
|
||||
39: Output files: %defines %verbose -o foo.c ok
|
||||
40: Output files: --defines=foo.hpp -o foo.c++ ok
|
||||
41: Output files: %defines "foo.hpp" -o foo.c++ ok
|
||||
42: Output files: -o foo.c++ --graph=foo.gph ok
|
||||
43: Output files: %skeleton "lalr1.cc" %defines %verbose ok
|
||||
44: Output files: %skeleton "lalr1.cc" %defines %verbose ok
|
||||
45: Output files: %skeleton "lalr1.cc" %defines %verbose -o subdir/foo.cc ok
|
||||
46: Output files: %skeleton "lalr1.cc" %defines %verbose %file-prefix "output_dir/foo" ok
|
||||
47: Conflicting output files: --graph="foo.tab.c" ok
|
||||
48: Conflicting output files: %defines "foo.output" -v ok
|
||||
49: Conflicting output files: %skeleton "lalr1.cc" %defines --graph="location.hh" ok
|
||||
50: Conflicting output files: -o foo.y ok
|
||||
51: Output file name: `~!@#$%^&*()-=_+{}[]|\:;<>, .' FAILED (output.at:200)
|
||||
52: Output file name: ( ok
|
||||
53: Output file name: ) ok
|
||||
54: Output file name: # ok
|
||||
55: Output file name: @@ ok
|
||||
56: Output file name: @{ ok
|
||||
57: Output file name: @} ok
|
||||
58: Output file name: [ ok
|
||||
59: Output file name: ] ok
|
||||
|
||||
Skeleton Support.
|
||||
|
||||
60: Relative skeleton file names ok
|
||||
61: Installed skeleton file names ok
|
||||
62: %define Boolean variables: invalid skeleton defaults ok
|
||||
63: Complaining during macro argument expansion ok
|
||||
64: Fatal errors make M4 exit immediately ok
|
||||
|
||||
Grammar Sets (Firsts etc.).
|
||||
|
||||
65: Nullable ok
|
||||
66: Broken Closure ok
|
||||
67: Firsts ok
|
||||
68: Accept ok
|
||||
|
||||
Grammar Reduction.
|
||||
|
||||
69: Useless Terminals ok
|
||||
70: Useless Nonterminals ok
|
||||
71: Useless Rules ok
|
||||
72: Reduced Automaton ok
|
||||
73: Underivable Rules ok
|
||||
74: Empty Language ok
|
||||
|
||||
User Actions.
|
||||
|
||||
75: Prologue synch line ok
|
||||
76: %union synch line ok
|
||||
77: Postprologue synch line ok
|
||||
78: Action synch line ok
|
||||
79: Epilogue synch line ok
|
||||
|
||||
Parser Headers.
|
||||
|
||||
80: %union and --defines ok
|
||||
81: Invalid CPP guards: input/input ok
|
||||
82: Invalid CPP guards: 9foo ok
|
||||
83: export YYLTYPE ok
|
||||
|
||||
User Actions.
|
||||
|
||||
84: Mid-rule actions ok
|
||||
85: Exotic Dollars ok
|
||||
86: Printers and Destructors : ok
|
||||
87: Printers and Destructors with union: ok
|
||||
88: Printers and Destructors : %defines %skeleton "lalr1.cc" ok
|
||||
89: Printers and Destructors with union: %defines %skeleton "lalr1.cc" ok
|
||||
90: Printers and Destructors : %glr-parser ok
|
||||
91: Printers and Destructors with union: %glr-parser ok
|
||||
92: Default tagless %printer and %destructor ok
|
||||
93: Default tagged and per-type %printer and %destructor ok
|
||||
94: Default %printer and %destructor for user-defined end token ok
|
||||
95: Default %printer and %destructor are not for error or $undefined ok
|
||||
96: Default %printer and %destructor are not for $accept ok
|
||||
97: Default %printer and %destructor for mid-rule values ok
|
||||
98: @$ in %initial-action implies %locations ok
|
||||
99: @$ in %destructor implies %locations ok
|
||||
100: @$ in %printer implies %locations ok
|
||||
|
||||
Conflicts.
|
||||
|
||||
101: S/R in initial ok
|
||||
102: %nonassoc and eof ok
|
||||
103: Unresolved SR Conflicts ok
|
||||
104: Resolved SR Conflicts ok
|
||||
105: Defaulted Conflicted Reduction ok
|
||||
106: %expect not enough ok
|
||||
107: %expect right ok
|
||||
108: %expect too much ok
|
||||
109: %expect with reduce conflicts ok
|
||||
110: %no-default-prec without %prec ok
|
||||
111: %no-default-prec with %prec ok
|
||||
112: %default-prec ok
|
||||
113: Unreachable States After Conflict Resolution ok
|
||||
114: Solved conflicts report for multiple reductions in a state ok
|
||||
115: %nonassoc error actions for multiple reductions in a state ok
|
||||
|
||||
Simple LALR(1) Calculator.
|
||||
|
||||
116: Calculator ok
|
||||
117: Calculator %defines ok
|
||||
118: Calculator %locations ok
|
||||
119: Calculator %name-prefix="calc" ok
|
||||
120: Calculator %verbose ok
|
||||
121: Calculator %yacc ok
|
||||
122: Calculator %error-verbose FAILED (calc.at:576)
|
||||
123: Calculator %define api.pure %locations ok
|
||||
124: Calculator %define api.push_pull "both" %define api.pure %locations ok
|
||||
125: Calculator %error-verbose %locations FAILED (calc.at:580)
|
||||
126: Calculator %error-verbose %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:582)
|
||||
127: Calculator %debug ok
|
||||
128: Calculator %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:585)
|
||||
129: Calculator %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:587)
|
||||
130: Calculator %define api.push_pull "both" %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:588)
|
||||
131: Calculator %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:590)
|
||||
|
||||
Simple GLR Calculator.
|
||||
|
||||
132: Calculator %glr-parser ok
|
||||
133: Calculator %glr-parser %defines ok
|
||||
134: Calculator %glr-parser %locations ok
|
||||
135: Calculator %glr-parser %name-prefix "calc" ok
|
||||
136: Calculator %glr-parser %verbose ok
|
||||
137: Calculator %glr-parser %yacc ok
|
||||
138: Calculator %glr-parser %error-verbose FAILED (calc.at:614)
|
||||
139: Calculator %glr-parser %define api.pure %locations ok
|
||||
140: Calculator %glr-parser %error-verbose %locations FAILED (calc.at:617)
|
||||
141: Calculator %glr-parser %error-verbose %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:619)
|
||||
142: Calculator %glr-parser %debug ok
|
||||
143: Calculator %glr-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:622)
|
||||
144: Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc FAILED (calc.at:624)
|
||||
145: Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:626)
|
||||
|
||||
Simple LALR(1) C++ Calculator.
|
||||
|
||||
146: Calculator %skeleton "lalr1.cc" %defines %locations ok
|
||||
147: Calculator %language "C++" %defines %locations ok
|
||||
148: Calculator %language "C++" %defines %locations %error-verbose %name-prefix "calc" %verbose %yacc FAILED (calc.at:646)
|
||||
149: Calculator %language "C++" %defines %locations %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:648)
|
||||
150: Calculator %language "C++" %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:650)
|
||||
151: Calculator %language "C++" %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:652)
|
||||
|
||||
Simple GLR C++ Calculator.
|
||||
|
||||
152: Calculator %skeleton "glr.cc" %defines %locations ok
|
||||
153: Calculator %language "C++" %glr-parser %defines %locations ok
|
||||
154: Calculator %language "C++" %glr-parser %defines %locations %error-verbose %name-prefix "calc" %verbose %yacc FAILED (calc.at:673)
|
||||
155: Calculator %language "C++" %glr-parser %defines %locations %debug ok
|
||||
156: Calculator %language "C++" %glr-parser %defines %locations %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:676)
|
||||
157: Calculator %language "C++" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc FAILED (calc.at:678)
|
||||
158: Calculator %language "C++" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count} FAILED (calc.at:680)
|
||||
|
||||
Torture Tests.
|
||||
|
||||
159: Big triangle ok
|
||||
160: Big horizontal ok
|
||||
161: Many lookahead tokens ok
|
||||
162: Exploding the Stack Size with Alloca ok
|
||||
163: Exploding the Stack Size with Malloc ok
|
||||
|
||||
Existing Grammars.
|
||||
|
||||
164: GNU AWK Grammar ok
|
||||
165: GNU Cim Grammar ok
|
||||
166: GNU pic Grammar ok
|
||||
|
||||
Regression tests.
|
||||
|
||||
167: Trivial grammars ok
|
||||
168: YYSTYPE typedef ok
|
||||
169: Early token definitions with --yacc ok
|
||||
170: Early token definitions without --yacc ok
|
||||
171: Braces parsing ok
|
||||
172: Duplicate string ok
|
||||
173: Rule Line Numbers ok
|
||||
174: Mixing %token styles ok
|
||||
175: Invalid inputs ok
|
||||
176: Invalid inputs with {} ok
|
||||
177: Token definitions ok
|
||||
178: Characters Escapes ok
|
||||
179: Web2c Report ok
|
||||
180: Web2c Actions ok
|
||||
181: Dancer ok
|
||||
182: Dancer %glr-parser ok
|
||||
183: Dancer %skeleton "lalr1.cc" ok
|
||||
184: Expecting two tokens ok
|
||||
185: Expecting two tokens %glr-parser ok
|
||||
186: Expecting two tokens %skeleton "lalr1.cc" ok
|
||||
187: Braced code in declaration in rules section ok
|
||||
188: String alias declared after use ok
|
||||
189: Extra lookahead sets in report ok
|
||||
190: Token number in precedence declaration ok
|
||||
191: Fix user actions without a trailing semicolon ok
|
||||
|
||||
C++ Features.
|
||||
|
||||
192: Doxygen Public Documentation skipped (c++.at:100)
|
||||
193: Doxygen Private Documentation skipped (c++.at:101)
|
||||
194: Relative namespace references ok
|
||||
195: Absolute namespace references ok
|
||||
196: Syntactically invalid namespace references ok
|
||||
|
||||
Java Calculator.
|
||||
|
||||
197: Calculator skipped (java.at:385)
|
||||
198: Calculator %error-verbose skipped (java.at:385)
|
||||
199: Calculator %locations skipped (java.at:385)
|
||||
200: Calculator %error-verbose %locations skipped (java.at:385)
|
||||
201: Calculator %lex-param { InputStream is } skipped (java.at:394)
|
||||
202: Calculator %error-verbose %lex-param { InputStream is } skipped (java.at:394)
|
||||
203: Calculator %locations %lex-param { InputStream is } skipped (java.at:394)
|
||||
204: Calculator %error-verbose %locations %lex-param { InputStream is } skipped (java.at:394)
|
||||
|
||||
Java Parameters.
|
||||
|
||||
205: Java parser class and package names skipped (java.at:482)
|
||||
206: Java parser class modifiers skipped (java.at:503)
|
||||
207: Java parser class extends and implements skipped (java.at:561)
|
||||
208: Java %parse-param and %lex-param skipped (java.at:581)
|
||||
209: Java throws specifications skipped (java.at:713)
|
||||
210: Java stype, position_class and location_class skipped (java.at:744)
|
||||
|
||||
C++ Type Syntax (GLR).
|
||||
|
||||
211: GLR: Resolve ambiguity, impure, no locations ok
|
||||
212: GLR: Resolve ambiguity, impure, locations ok
|
||||
213: GLR: Resolve ambiguity, pure, no locations ok
|
||||
214: GLR: Resolve ambiguity, pure, locations ok
|
||||
215: GLR: Merge conflicting parses, impure, no locations ok
|
||||
216: GLR: Merge conflicting parses, impure, locations ok
|
||||
217: GLR: Merge conflicting parses, pure, no locations ok
|
||||
218: GLR: Merge conflicting parses, pure, locations ok
|
||||
219: GLR: Verbose messages, resolve ambiguity, impure, no locations ok
|
||||
|
||||
GLR Regression Tests
|
||||
|
||||
220: Badly Collapsed GLR States ok
|
||||
221: Improper handling of embedded actions and dollar(-N) in GLR parsers ok
|
||||
222: Improper merging of GLR delayed action sets ok
|
||||
223: Duplicate representation of merged trees ok
|
||||
224: User destructor for unresolved GLR semantic value ok
|
||||
225: User destructor after an error during a split parse ok
|
||||
226: Duplicated user destructor for lookahead ok
|
||||
227: Incorrectly initialized location for empty right-hand side in GLR ok
|
||||
228: No users destructors if stack 0 deleted ok
|
||||
229: Corrupted semantic options if user action cuts parse ok
|
||||
230: Undesirable destructors if user action cuts parse ok
|
||||
231: Leaked semantic values if user action cuts parse ok
|
||||
232: Incorrect lookahead during deterministic GLR ok
|
||||
233: Incorrect lookahead during nondeterministic GLR ok
|
||||
234: Leaked semantic values when reporting ambiguity ok
|
||||
235: Leaked lookahead after nondeterministic parse syntax error ok
|
||||
236: Uninitialized location when reporting ambiguity ok
|
||||
237: Missed %merge type warnings when LHS type is declared later ok
|
||||
|
||||
Push Parsing Tests
|
||||
|
||||
238: Push Parsing: Memory Leak for Early Deletion ok
|
||||
239: Push Parsing: Multiple impure instances ok
|
||||
240: Push Parsing: Unsupported Skeletons ok
|
||||
|
||||
## ------------- ##
|
||||
## Test results. ##
|
||||
## ------------- ##
|
||||
|
||||
ERROR: 224 tests were run,
|
||||
22 failed unexpectedly.
|
||||
16 tests were skipped.
|
||||
## -------------------------- ##
|
||||
## testsuite.log was created. ##
|
||||
## -------------------------- ##
|
||||
|
||||
Please send `tests/testsuite.log' and all information you think might help:
|
||||
|
||||
To: <bug-bison@gnu.org>
|
||||
Subject: [GNU Bison 2.4.1] testsuite: 51 122 125 126 128 129 130 131 138 140 141 143 144 145 148 149 150 151 154 156 157 158 failed
|
||||
|
||||
|
||||
You may investigate any problem if you feel able to do so, in which
|
||||
case the test suite provides a good starting point. Its output may
|
||||
be found below `tests/testsuite.dir'.
|
||||
|
||||
make[3]: [check-local] Error 1 (ignored)
|
||||
make[3]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/tests'
|
||||
Making check in etc
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/etc'
|
||||
make[2]: Nothing to be done for `check'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1/etc'
|
||||
make[2]: Entering directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
|
||||
make[2]: Nothing to be done for `check-am'.
|
||||
make[2]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
|
||||
make[1]: Leaving directory `/cygdrive/j/Devel/bison/2.4.1/bison-2.4.1'
|
|
@ -0,0 +1,38 @@
|
|||
Flex carries the copyright used for BSD software, slightly modified
|
||||
because it originated at the Lawrence Berkeley (not Livermore!) Laboratory,
|
||||
which operates under a contract with the Department of Energy:
|
||||
|
||||
Copyright (c) 1990 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
|
||||
This code is derived from software contributed to Berkeley by
|
||||
Vern Paxson.
|
||||
|
||||
The United States Government has rights in this work pursuant
|
||||
to contract no. DE-AC03-76SF00098 between the United States
|
||||
Department of Energy and the University of California.
|
||||
|
||||
Redistribution and use in source and binary forms with or without
|
||||
modification are permitted provided that: (1) source distributions
|
||||
retain this entire copyright notice and comment, and (2)
|
||||
distributions including binaries display the following
|
||||
acknowledgement: ``This product includes software developed by the
|
||||
University of California, Berkeley and its contributors'' in the
|
||||
documentation or other materials provided with the distribution and
|
||||
in all advertising materials mentioning features or use of this
|
||||
software. Neither the name of the University nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
|
||||
This basically says "do whatever you please with this software except
|
||||
remove this notice or take advantage of the University's (or the flex
|
||||
authors') name".
|
||||
|
||||
Note that the "flex.skl" scanner skeleton carries no copyright notice.
|
||||
You are free to do whatever you please with scanners generated using flex;
|
||||
for them, you are not even bound by the above copyright.
|
|
@ -0,0 +1,117 @@
|
|||
This is a generic INSTALL file for utilities distributions.
|
||||
If this package does not come with, e.g., installable documentation or
|
||||
data files, please ignore the references to them below.
|
||||
|
||||
To compile this package:
|
||||
|
||||
1. Configure the package for your system. In the directory that this
|
||||
file is in, type `./configure'. If you're using `csh' on an old
|
||||
version of System V, you might need to type `sh configure' instead to
|
||||
prevent `csh' from trying to execute `configure' itself.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation, and
|
||||
creates the Makefile(s) (one in each subdirectory of the source
|
||||
directory). In some packages it creates a C header file containing
|
||||
system-dependent definitions. It also creates a file `config.status'
|
||||
that you can run in the future to recreate the current configuration.
|
||||
|
||||
Running `configure' takes a minute or two. While it is running, it
|
||||
prints some messages that tell what it is doing. If you don't want to
|
||||
see the messages, run `configure' with its standard output redirected
|
||||
to `/dev/null'; for example, `./configure >/dev/null'.
|
||||
|
||||
To compile the package in a different directory from the one
|
||||
containing the source code, you must use a version of `make' that
|
||||
supports the VPATH variable, such as GNU `make'. `cd' to the directory
|
||||
where you want the object files and executables to go and run
|
||||
`configure'. `configure' automatically checks for the source code in
|
||||
the directory that `configure' is in and in `..'. If for some reason
|
||||
`configure' is not in the source code directory that you are
|
||||
configuring, then it will report that it can't find the source code.
|
||||
In that case, run `configure' with the option `--srcdir=DIR', where
|
||||
DIR is the directory that contains the source code.
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
|
||||
an installation prefix other than /usr/local by giving `configure' the
|
||||
option `--prefix=PATH'. Alternately, you can do so by giving a value
|
||||
for the `prefix' variable when you run `make', e.g.,
|
||||
make prefix=/usr/gnu
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If
|
||||
you give `configure' the option `--exec-prefix=PATH' or set the
|
||||
`make' variable `exec_prefix' to PATH, the package will use PATH as
|
||||
the prefix for installing programs and libraries. Data files and
|
||||
documentation will still use the regular prefix. Normally, all files
|
||||
are installed using the regular prefix.
|
||||
|
||||
Another `configure' option is useful mainly in `Makefile' rules for
|
||||
updating `config.status' and `Makefile'. The `--no-create' option
|
||||
figures out the configuration for your system and records it in
|
||||
`config.status', without actually configuring the package (creating
|
||||
`Makefile's and perhaps a configuration header file). Later, you can
|
||||
run `./config.status' to actually configure the package. You can also
|
||||
give `config.status' the `--recheck' option, which makes it re-run
|
||||
`configure' with the same arguments you used before. This option is
|
||||
useful if you change `configure'.
|
||||
|
||||
Some packages pay attention to `--with-PACKAGE' options to `configure',
|
||||
where PACKAGE is something like `gnu-libc' or `x' (for X windows).
|
||||
The README should mention any --with- options that the package recognizes.
|
||||
|
||||
`configure' ignores any other arguments that you give it.
|
||||
|
||||
If your system requires unusual options for compilation or linking
|
||||
that `configure' doesn't know about, you can give `configure' initial
|
||||
values for some variables by setting them in the environment. In
|
||||
Bourne-compatible shells, you can do that on the command line like
|
||||
this:
|
||||
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
|
||||
|
||||
The `make' variables that you might want to override with environment
|
||||
variables when running `configure' are:
|
||||
|
||||
(For these variables, any value given in the environment overrides the
|
||||
value that `configure' would choose:)
|
||||
CC C compiler program.
|
||||
Default is `cc', or `gcc' if `gcc' is in your PATH.
|
||||
INSTALL Program to use to install files.
|
||||
Default is `install' if you have it, `cp' otherwise.
|
||||
|
||||
(For these variables, any value given in the environment is added to
|
||||
the value that `configure' chooses:)
|
||||
DEFS Configuration options, in the form `-Dfoo -Dbar ...'
|
||||
Do not use this variable in packages that create a
|
||||
configuration header file.
|
||||
LIBS Libraries to link with, in the form `-lfoo -lbar ...'
|
||||
|
||||
If you need to do unusual things to compile the package, we encourage
|
||||
you to figure out how `configure' could check whether to do them, and
|
||||
mail diffs or instructions to the address given in the README so we
|
||||
can include them in the next release.
|
||||
|
||||
2. Type `make' to compile the package. If you want, you can override
|
||||
the `make' variables CFLAGS and LDFLAGS like this:
|
||||
|
||||
make CFLAGS=-O2 LDFLAGS=-s
|
||||
|
||||
3. If the package comes with self-tests and you want to run them,
|
||||
type `make check'. If you're not sure whether there are any, try it;
|
||||
if `make' responds with something like
|
||||
make: *** No way to make target `check'. Stop.
|
||||
then the package does not come with self-tests.
|
||||
|
||||
4. Type `make install' to install programs, data files, and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source directory by typing `make clean'. To also remove the
|
||||
Makefile(s), the header file containing system-dependent definitions
|
||||
(if the package uses one), and `config.status' (all the files that
|
||||
`configure' created), type `make distclean'.
|
||||
|
||||
The file `configure.in' is used as a template to create `configure' by
|
||||
a program called `autoconf'. You will only need it if you want to
|
||||
regenerate `configure' using a newer version of `autoconf'.
|
|
@ -0,0 +1,66 @@
|
|||
Received: from 128.140.1.1 by ee.lbl.gov for <vern@ee.lbl.gov> (8.6.9/1.43r)
|
||||
id PAA03966; Tue, 24 Jan 1995 15:03:57 -0800
|
||||
Received: from larry-le0.cc.emory.edu by
|
||||
emoryu1.cc.emory.edu (5.65/Emory_cc.4.0.1) via SMTP
|
||||
id AA24158 ; Tue, 24 Jan 95 17:18:18 -0500
|
||||
From: tkane01@unix.cc.emory.edu (Terrence O Kane)
|
||||
Received: by larry.cc.emory.edu (5.0) id AA21979; Tue, 24 Jan 1995 17:17:40 -0500
|
||||
Message-Id: <9501242217.AA21979@larry.cc.emory.edu>
|
||||
Subject: Re: Beta test for DOS
|
||||
To: vern@ee.lbl.gov (Vern Paxson)
|
||||
Date: Tue, 24 Jan 1995 17:17:38 -0500 (EST)
|
||||
In-Reply-To: <199501232138.NAA11430@daffy.ee.lbl.gov> from "Vern Paxson" at Jan 23, 95 01:38:02 pm
|
||||
X-Mailer: ELM [version 2.4 PL23]
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Length: 5792
|
||||
|
||||
Vern,
|
||||
|
||||
I've made flex 2.5.0.6 successfully with no changes to the source
|
||||
code at all. I'm including the Borland 4.02 makefile and config.h
|
||||
at the end of this message.
|
||||
|
||||
When you're ready for release, I'll be happy to take care of getting
|
||||
the appropriate archive files up to Simtel if you wish.
|
||||
|
||||
I have not used this version for any of my "work-related" scanners
|
||||
yet, but have run the fastwc benchmark. The compiles were for large
|
||||
memory model and optimization for fastest possible code. The test
|
||||
machine was a Pentium-90 (hey! timing output was integer!) with
|
||||
enhanced IDE on a PCI bus and no file system caching. I ran the
|
||||
test on two different input files.
|
||||
|
||||
(Times are in seconds.)
|
||||
|
||||
The first input was a typical postscript file concatenated 10 times;
|
||||
by typical, I mean that there were relatively few spaces, lots of lines
|
||||
with no space, using lots of parentheses.
|
||||
|
||||
lines words characters
|
||||
91200 356260 5889240
|
||||
|
||||
mywc 8.89
|
||||
wc1s 15.22 default
|
||||
wc1 10.82 -Cf
|
||||
wc2 10.16 -Cf
|
||||
wc3 9.17 -Cf
|
||||
wc4 9.22 -Cf
|
||||
wc5 10.98 -Cf
|
||||
|
||||
The second test run was on a file that consisted of 20 concatenations
|
||||
of 'misc/flex.man'.
|
||||
|
||||
lines words characters
|
||||
69960 305140 2399960
|
||||
|
||||
mywc 4.01
|
||||
wc1s 6.87
|
||||
wc1 5.32
|
||||
wc2 4.95
|
||||
wc3 4.12
|
||||
wc4 4.12
|
||||
wc5 5.05
|
||||
|
||||
[[Makefile and config.h moved to separate files -VP]]
|
|
@ -0,0 +1,44 @@
|
|||
These patches and supplemental programs should allow porting to MVS or MVS/XA
|
||||
in an EBCDIC envrionment, using SAS C V4.00C.
|
||||
|
||||
Included are:
|
||||
-rw-r--r-- 1 swl26 1573 Jul 17 14:32 README
|
||||
-rw-rw-r-- 1 swl26 20861 Jul 17 13:41 diffs
|
||||
-rw-rw-r-- 1 swl26 5022 Jul 17 14:00 fixit.l
|
||||
-rw-rw-r-- 1 swl26 97644 Jul 17 13:42 initscan.mvs.c
|
||||
-rw-rw-r-- 1 swl26 4898 Jul 17 14:08 unfixit.l
|
||||
|
||||
The file "diffs" contains context diffs for changes to flex 2.3.
|
||||
|
||||
The file "fixit.l" contains flex sources for a program to shorten external
|
||||
variable and function names to 8 characters or less. This is required for the
|
||||
"dumb" compiler linker used.
|
||||
|
||||
The file "unfixit.l" reverses the changes in "fixit.l", to restore long names.
|
||||
This is useful when trying to build diff files as created here.
|
||||
|
||||
The file "initscan.mvs.c" is an already "flexed" version of scan.l, in an
|
||||
EBCDIC environment.
|
||||
|
||||
To install in an MVS environment, use patch to apply the diffs to flex 2.3,
|
||||
then run "fixit" on all .c, .h, .l, .y, and .skel files. Move the files
|
||||
to the MVS machine, and compile each of the .c files. (You will need a
|
||||
"yacc" functional equivalent under MVS to expand parse.y in that
|
||||
environment.) Link together, and the resulting flex should be ready to
|
||||
go. To test, run the MVSflex -is8 -Ce on the scan.l, and you should get
|
||||
back a file which is identical to initscan.mvs.c.
|
||||
|
||||
Enjoy.
|
||||
|
||||
Steven W. Layten
|
||||
Senior Engineer
|
||||
Chemical Abstracts Service
|
||||
PO Box 3012
|
||||
2540 Olentangy River Road
|
||||
Columbus, Ohio 43210
|
||||
|
||||
+1 614 421 3600 extension 3451
|
||||
|
||||
INET: swl26%cas.BITNET@CUNYVM.CUNY.Edu
|
||||
UUCP: osu-cis!chemabs!swl26
|
||||
BITNET: swl26@cas.bitnet
|
|
@ -0,0 +1,76 @@
|
|||
Miscellaneous flex stuff. The items which have been tested with flex 2.5 are:
|
||||
|
||||
- texinfo/, a subdirectory containing a "texinfo" version of flex(1)
|
||||
and the corresponding "info" files (contributed by Francois Pinard).
|
||||
|
||||
- VMS/, a subdirectory containing makefiles, configuration files,
|
||||
run-time support, and installation notes for building flex 2.5
|
||||
on VMS (contributed by Pat Rankin).
|
||||
|
||||
- Borland/ - makefile and config.h for Borland 4.02 compiler
|
||||
(contributed by Terrence O Kane, who notes that no source
|
||||
code changes were necessary).
|
||||
|
||||
- NT/ - Makefile and config.h for NT, contributed by Stan Adermann.
|
||||
|
||||
- OS2/ - Makefile and config.h for building flex under OS/2,
|
||||
contributed by Kai Uwe Rommel.
|
||||
|
||||
- Amiga/: notes on building flex for the Amiga, contributed
|
||||
by Andreas Scherer.
|
||||
|
||||
- parse.c, parse.h - output of running yacc (byacc, actually)
|
||||
on parse.y. If your system doesn't have a flavor of yacc available,
|
||||
copy these into the main flex source directory instead.
|
||||
|
||||
- flex.man - preformatted version of flex man page
|
||||
|
||||
|
||||
The following have been tested using flex 2.4:
|
||||
|
||||
- debflex.awk, an awk script for anotating flex debug output.
|
||||
It presently only works with gawk and mawk, not with "old"
|
||||
or "new" awk.
|
||||
|
||||
- NeXT: ProjectBuilder.app support for use in the NeXT world.
|
||||
|
||||
- Notes on building flex for the Macintosh using Think-C,
|
||||
in the Macintosh/ subdirectory.
|
||||
|
||||
- testxxLexer.l, a sample C++ program that uses flex's scanner
|
||||
class option ("-+").
|
||||
|
||||
- fastwc/, a subdirectory containing examples of how to use flex
|
||||
to write progressively higher-performance versions of the Unix
|
||||
"wc" utility. This certainly should work with 2.5, but hasn't
|
||||
been tested.
|
||||
|
||||
- Borland.old/: notes on building flex 2.4 for Borland C++ 3.1
|
||||
on MS-DOS. These shouldn't be needed for flex 2.5. Included
|
||||
only in case you encounter unanticipated difficulties.
|
||||
|
||||
- EBCDIC: contact information for building flex for EBCDIC.
|
||||
|
||||
|
||||
The following are all out-of-date with respect to flex release 2.4 (and
|
||||
in general up-to-date for flex 2.3):
|
||||
|
||||
- Atari/Atari.patches, patches for porting flex to the Atari and
|
||||
to Minix.
|
||||
|
||||
- A number of notes and Makefiles for compiling flex under MS-DOS,
|
||||
in the MSDOS/ subdirectory.
|
||||
|
||||
- Notes on building flex for MVS, in the MVS/ subdirectory.
|
||||
|
||||
If any of this is out-of-date and can be deleted, please let me know.
|
||||
|
||||
And the following is included for compatibility with some broken versions
|
||||
of bison:
|
||||
|
||||
- alloca.c, a public-domain, mostly-portable version of the
|
||||
alloca() routine (used by bison's parsers) written by D. A. Gwyn.
|
||||
|
||||
|
||||
Many thanks to those who contributed these files. Updated versions will
|
||||
be appreciated!
|
|
@ -0,0 +1,56 @@
|
|||
This directory contains some examples illustrating techniques for extracting
|
||||
high-performance from flex scanners. Each program implements a simplified
|
||||
version of the Unix "wc" tool: read text from stdin and print the number of
|
||||
characters, words, and lines present in the text. All programs were compiled
|
||||
using gcc (version unavailable, sorry) with the -O flag, and run on a
|
||||
SPARCstation 1+. The input used was a PostScript file, mainly containing
|
||||
figures, with the following "wc" counts:
|
||||
|
||||
lines words characters
|
||||
214217 635954 2592172
|
||||
|
||||
|
||||
The basic principles illustrated by these programs are:
|
||||
|
||||
- match as much text with each rule as possible
|
||||
- adding rules does not slow you down!
|
||||
- avoid backing up
|
||||
|
||||
and the big caveat that comes with them is:
|
||||
|
||||
- you buy performance with decreased maintainability; make
|
||||
sure you really need it before applying the above techniques.
|
||||
|
||||
See the "Performance Considerations" section of flexdoc for more
|
||||
details regarding these principles.
|
||||
|
||||
|
||||
The different versions of "wc":
|
||||
|
||||
mywc.c
|
||||
a simple but fairly efficient C version
|
||||
|
||||
wc1.l a naive flex "wc" implementation
|
||||
|
||||
wc2.l somewhat faster; adds rules to match multiple tokens at once
|
||||
|
||||
wc3.l faster still; adds more rules to match longer runs of tokens
|
||||
|
||||
wc4.l fastest; still more rules added; hard to do much better
|
||||
using flex (or, I suspect, hand-coding)
|
||||
|
||||
wc5.l identical to wc3.l except one rule has been slightly
|
||||
shortened, introducing backing-up
|
||||
|
||||
Timing results (all times in user CPU seconds):
|
||||
|
||||
program time notes
|
||||
------- ---- -----
|
||||
wc1 16.4 default flex table compression (= -Cem)
|
||||
wc1 6.7 -Cf compression option
|
||||
/bin/wc 5.8 Sun's standard "wc" tool
|
||||
mywc 4.6 simple but better C implementation!
|
||||
wc2 4.6 as good as C implementation; built using -Cf
|
||||
wc3 3.8 -Cf
|
||||
wc4 3.3 -Cf
|
||||
wc5 5.7 -Cf; ouch, backing up is expensive
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,60 @@
|
|||
This is release 2.5 of flex. See "version.h" for the exact patch-level.
|
||||
|
||||
See the file "NEWS" to find out what is new in this Flex release.
|
||||
|
||||
Read the file "INSTALL" for general installation directives. Peek near
|
||||
the beginning of the file "Makefile.in" for special DEFS values. On most
|
||||
systems, you can just run the "configure" script and type "make" to build
|
||||
flex; then "make check" to test whether it built correctly; and if it did,
|
||||
then "make install" to install it.
|
||||
|
||||
If you're feeling adventurous, you can also issue "make bigcheck" (be
|
||||
prepared to wait a while).
|
||||
|
||||
Note that flex is distributed under a copyright very similar to that of
|
||||
BSD Unix, and not under the GNU General Public License (GPL), except for
|
||||
the "configure" script, which is covered by the GPL.
|
||||
|
||||
Many thanks to the 2.5 beta-testers for finding bugs and helping test and
|
||||
increase portability: Stan Adermann, Scott David Daniels, Charles Elliott,
|
||||
Joe Gayda, Chris Meier, James Nordby, Terrence O'Kane, Karsten Pahnke,
|
||||
Francois Pinard, Pat Rankin, Andreas Scherer, Marc Wiese, Nathan Zelle.
|
||||
|
||||
Please send bug reports and feedback to: Vern Paxson (vern@ee.lbl.gov).
|
||||
|
||||
|
||||
The flex distribution consists of the following files:
|
||||
|
||||
README This message
|
||||
|
||||
NEWS Differences between the various releases
|
||||
|
||||
INSTALL General installation information
|
||||
|
||||
COPYING flex's copyright
|
||||
|
||||
conf.in, configure.in, configure, Makefile.in, install.sh,
|
||||
mkinstalldirs
|
||||
elements of the "autoconf" auto-configuration process
|
||||
|
||||
flexdef.h, parse.y, scan.l, ccl.c, dfa.c, ecs.c, gen.c, main.c,
|
||||
misc.c, nfa.c, sym.c, tblcmp.c, yylex.c
|
||||
source files
|
||||
|
||||
version.h version of this flex release
|
||||
|
||||
flex.skl flex scanner skeleton
|
||||
mkskel.sh script for converting flex.skl to C source file skel.c
|
||||
skel.c pre-converted C version of flex.skl
|
||||
|
||||
libmain.c flex library (-lfl) sources
|
||||
libyywrap.c
|
||||
|
||||
initscan.c pre-flex'd version of scan.l
|
||||
|
||||
FlexLexer.h header file for C++ lexer class
|
||||
|
||||
flex.1 user documentation
|
||||
|
||||
MISC/ a directory containing miscellaneous contributions.
|
||||
See MISC/README for details.
|
|
@ -0,0 +1,3 @@
|
|||
kernel32.dll
|
||||
msvcrt.dll
|
||||
ntdll.dll
|
|
@ -0,0 +1,51 @@
|
|||
* Flex-2.5.4a for Windows *
|
||||
===========================
|
||||
|
||||
What is it?
|
||||
-----------
|
||||
Flex: fast lexical analyzer generator
|
||||
|
||||
Description
|
||||
-----------
|
||||
Flex is a fast lexical analyser generator. It is a tool for generating
|
||||
programs that perform pattern-matching on text. There are many applications
|
||||
for Flex, including writing compilers in conjunction with GNU Bison. Flex
|
||||
is a free implementation of the well known Lex program. It features a Lex
|
||||
compatibility mode, and also provides several new features such as exclusive
|
||||
start conditions.
|
||||
|
||||
Homepage
|
||||
--------
|
||||
http://www.gnu.org/software/flex/flex.html
|
||||
|
||||
System
|
||||
------
|
||||
- MS-Windows 95 / 98 / ME / NT / 2000 / XP with msvcrt.dll
|
||||
- if msvcrt.dll is not in your Windows/System folder, get it from
|
||||
Microsoft <http://support.microsoft.com/default.aspx?scid=kb;en-us;259403">
|
||||
or by installing Internet Explorer 4.0 or higher
|
||||
<http://www.microsoft.com/windows/ie>
|
||||
|
||||
Notes
|
||||
-----
|
||||
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
|
||||
|
||||
Package Availability
|
||||
--------------------
|
||||
- in: http://gnuwin32.sourceforge.net
|
||||
|
||||
Sources
|
||||
-------
|
||||
- flex-2.5.4a-1-src.zip
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
The package has been compiled with GNU auto-tools, GNU make, and Mingw
|
||||
(GCC for MS-Windows). Any differences from the original sources are given
|
||||
in flex-2.5.4a-1-GnuWin32.diffs in flex-2.5.4a-1-src.zip. Libraries needed
|
||||
for compilation can be found at the lines starting with 'LIBS = ' in the
|
||||
Makefiles. Usually, these are standard libraries provided with Mingw, or
|
||||
libraries from the package itself; 'gw32c' refers to the libgw32c package,
|
||||
which provides MS-Windows substitutes or stubs for functions normally found in
|
||||
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
|
||||
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.
|
|
@ -0,0 +1,3 @@
|
|||
kernel32.dll
|
||||
msvcrt.dll
|
||||
ntdll.dll
|
|
@ -0,0 +1,54 @@
|
|||
* Gperf-3.0.1 for Windows *
|
||||
===========================
|
||||
|
||||
What is it?
|
||||
-----------
|
||||
Gperf: generate a perfect hash function from a key set
|
||||
|
||||
Description
|
||||
-----------
|
||||
GNU gperf is a perfect hash function generator. For a given list of
|
||||
strings, it produces a hash function and hash table in the form of
|
||||
C or C++ code, for looking up a value depending on the input string.
|
||||
The hash function is perfect,' which means that the hash table has
|
||||
no collisions, and the hash table lookup needs a single string
|
||||
comparison only. GNU gperf is highly customizable. There are options
|
||||
for generating C and C++ code, for emitting 'switch' statements or
|
||||
nested 'ifs' instead of a hash table, and for tuning the algorithm
|
||||
that gperf uses.
|
||||
|
||||
Homepage
|
||||
--------
|
||||
http://www.gnu.org/software/gperf/gperf.html
|
||||
|
||||
System
|
||||
------
|
||||
- MS-Windows 95 / 98 / ME / NT / 2000 / XP with msvcrt.dll
|
||||
- if msvcrt.dll is not in your Windows/System folder, get it from
|
||||
Microsoft <http://support.microsoft.com/default.aspx?scid=kb;en-us;259403">
|
||||
or by installing Internet Explorer 4.0 or higher
|
||||
<http://www.microsoft.com/windows/ie>
|
||||
|
||||
Notes
|
||||
-----
|
||||
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
|
||||
|
||||
Package Availability
|
||||
--------------------
|
||||
- in: http://gnuwin32.sourceforge.net
|
||||
|
||||
Sources
|
||||
-------
|
||||
- gperf-3.0.1-src.zip
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
The package has been compiled with GNU auto-tools, GNU make, and Mingw
|
||||
(GCC for MS-Windows). Any differences from the original sources are given
|
||||
in gperf-3.0.1-GnuWin32.diffs in gperf-3.0.1-src.zip. Libraries needed
|
||||
for compilation can be found at the lines starting with 'LIBS = ' in the
|
||||
Makefiles. Usually, these are standard libraries provided with Mingw, or
|
||||
libraries from the package itself; 'gw32c' refers to the libgw32c package,
|
||||
which provides MS-Windows substitutes or stubs for functions normally found in
|
||||
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
|
||||
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.
|
|
@ -0,0 +1,2 @@
|
|||
Douglas C. Schmidt <schmidt@ics.uci.edu>
|
||||
Bruno Haible <bruno@clisp.org>
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307,
|
||||
USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 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, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,183 @@
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
New in 3.0.1:
|
||||
|
||||
* Bug fix.
|
||||
|
||||
New in 3.0:
|
||||
|
||||
* Added option --output that allows to specify the output file name.
|
||||
* Some options have been renamed:
|
||||
--hash-fn-name=NAME --> --hash-function-name=NAME
|
||||
--lookup-fn-name=NAME --> --lookup-function-name=NAME
|
||||
--compare-strlen --> --compare-lengths
|
||||
--global --> --global-table
|
||||
The older variants are still supported for backward compatibility.
|
||||
* The following options can now be specified inside the input file:
|
||||
%delimiters=DELIMITER-LIST
|
||||
%struct-type
|
||||
%ignore-case
|
||||
%language=LANGUAGE-NAME
|
||||
%define slot-name NAME
|
||||
%define initializer-suffix INITIALIZERS
|
||||
%define hash-function-name NAME
|
||||
%define lookup-function-name NAME
|
||||
%define class-name NAME
|
||||
%7bit
|
||||
%compare-lengths
|
||||
%compare-strncmp
|
||||
%readonly-tables
|
||||
%enum
|
||||
%includes
|
||||
%global-table
|
||||
%pic
|
||||
%define string-pool-name NAME
|
||||
%null-strings
|
||||
%define word-array-name NAME
|
||||
%switch=COUNT
|
||||
%omit-struct-type
|
||||
* When the option -k is not given, the default key positions are now
|
||||
computed depending on the set of keywords.
|
||||
* If the input file is given by name, the output file will now contain
|
||||
#line directives referring to the input file.
|
||||
* Some keyword sets containing permutations, like { "xy", "yx", "xz", "zx" }
|
||||
or { "abc", "acb", "bca", "cab" }, are now handled by gperf without
|
||||
requiring the option -D.
|
||||
* The generated table is usually much smaller than it was with earlier
|
||||
versions of gperf.
|
||||
* Added option -m/--multiple-iterations that allows to further reduce the
|
||||
size of the generated table.
|
||||
* When the search for a good hash function is not immediately successful,
|
||||
the table's size will grow as needed. Earlier versions of gperf bailed
|
||||
out with an "Internal error, duplicate hash code value".
|
||||
* The options -f/--fast and -o/--occurrence-sort have no effect any more.
|
||||
* Added options -P/--pic and --null-strings that optimize the generated code
|
||||
for use in shared libraries. -P/--pic does a perfect optimization but may
|
||||
require some small code changes (see the documentation for details), whereas
|
||||
--null-strings does only a half-hearted optimization but works without
|
||||
needing any change to surrounding code.
|
||||
* Added option --ignore-case that produces a case independent lookup function.
|
||||
* Bug fixes.
|
||||
|
||||
New in 2.7.2:
|
||||
|
||||
* Keywords may now be enclosed in double quotes; this permits the use of
|
||||
'#', ',', space or NUL inside keywords.
|
||||
* Bug fixes.
|
||||
|
||||
New in 2.7.1:
|
||||
|
||||
* Added option "-F" for gcc.
|
||||
|
||||
New in 2.7:
|
||||
|
||||
* gperf is now a stand-alone package, untied from libg++.
|
||||
* Autoconfiguring.
|
||||
* Removed the "-a" and "-g" options, extended the "-L" option instead.
|
||||
* Removed the "-p" option, it is the default.
|
||||
* Added long options ("--help", "--version" etc.).
|
||||
* 8-bit cleanliness is now the default; use "-7" to get the old behaviour.
|
||||
* Compiles with any C++ compiler.
|
||||
* Numerous small improvements.
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
This is GNU gperf. It is a program that generates perfect hash
|
||||
functions for sets of key words. A perfect hash function is:
|
||||
|
||||
A hash function and a data structure that allows
|
||||
recognition of a key word in a set of words using
|
||||
exactly 1 probe into the data structure.
|
||||
|
||||
The doc/gperf.html file explains how the program works, the form of
|
||||
the input, what options are available, and hints on choosing the best
|
||||
options for particular key words set.
|
||||
|
||||
See the file NEWS for a list of major changes in the current release.
|
||||
|
||||
See the file INSTALL for compilation and installation instructions.
|
||||
|
||||
Output from the GPERF program is used to recognize reserved words in
|
||||
the GNU C, GNU C++, and GNU Pascal compilers, as well as with the GNU
|
||||
indent program.
|
||||
|
||||
For general documentation on the coding and usage standards
|
||||
this distribution follows, see the GNU standards document
|
||||
ftp://ftp.gnu.org/pub/gnu/standards.*, especially the 'Makefile
|
||||
Conventions', 'Configuration', and 'User Interfaces' sections.
|
||||
|
||||
Mail suggestions and bug reports to <bug-gnu-gperf@gnu.org>. When
|
||||
reporting bugs, please include in the subject line the package name
|
||||
and version (output of 'gperf --version') for which you found a problem.
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
cd lib; make check
|
||||
make[1]: Entering directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/lib'
|
||||
make[1]: Niets te doen voor `check'.
|
||||
make[1]: Leaving directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/lib'
|
||||
cd src; make check
|
||||
make[1]: Entering directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/src'
|
||||
make[1]: Niets te doen voor `check'.
|
||||
make[1]: Leaving directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/src'
|
||||
cd tests; make check
|
||||
make[1]: Entering directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/tests'
|
||||
performing some tests of the perfect hash generator
|
||||
gcc -c -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 ../../gperf-3.0.1-src/tests/test.c
|
||||
../src/gperf -c -l -S1 -I -o ../../gperf-3.0.1-src/tests/c.gperf > cinset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o cout cinset.c test.o
|
||||
testing ANSI C reserved words, all items should be found in the set
|
||||
./cout -v < ../../gperf-3.0.1-src/tests/c.gperf > c.out
|
||||
diff ../../gperf-3.0.1-src/tests/c.exp c.out
|
||||
../src/gperf -k1,4,'$' -I ../../gperf-3.0.1-src/tests/ada.gperf > adainset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o aout adainset.c test.o
|
||||
testing Ada reserved words, all items should be found in the set
|
||||
./aout -v < ../../gperf-3.0.1-src/tests/ada.gperf > ada-res.out
|
||||
diff ../../gperf-3.0.1-src/tests/ada-res.exp ada-res.out
|
||||
../src/gperf -D -k1,'$' -s 2 -I -o ../../gperf-3.0.1-src/tests/adadefs.gperf > preinset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o preout preinset.c test.o
|
||||
testing Ada predefined words, all items should be found in the set
|
||||
./preout -v < ../../gperf-3.0.1-src/tests/adadefs.gperf > ada-pred.out
|
||||
diff ../../gperf-3.0.1-src/tests/ada-pred.exp ada-pred.out
|
||||
../src/gperf -k1,2,'$' -I -o ../../gperf-3.0.1-src/tests/modula3.gperf > m3inset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o m3out m3inset.c test.o
|
||||
testing Modula3 reserved words, all items should be found in the set
|
||||
./m3out -v < ../../gperf-3.0.1-src/tests/modula3.gperf > modula.out
|
||||
diff ../../gperf-3.0.1-src/tests/modula.exp modula.out
|
||||
../src/gperf -o -S2 -I < ../../gperf-3.0.1-src/tests/pascal.gperf > pinset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o pout pinset.c test.o
|
||||
testing Pascal reserved words, all items should be found in the set
|
||||
./pout -v < ../../gperf-3.0.1-src/tests/pascal.gperf > pascal.out
|
||||
diff ../../gperf-3.0.1-src/tests/pascal.exp pascal.out
|
||||
../src/gperf -k1 -t -I -K foreign_name < ../../gperf-3.0.1-src/tests/lang-utf8.gperf > lu8inset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o lu8out lu8inset.c test.o
|
||||
testing UTF-8 encoded languages, all items should be found in the set
|
||||
sed -e '1,6d' -e 's/,.*//' < ../../gperf-3.0.1-src/tests/lang-utf8.gperf | ./lu8out -v > lang-utf8.out
|
||||
diff ../../gperf-3.0.1-src/tests/lang-utf8.exp lang-utf8.out
|
||||
gcc -c -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 ../../gperf-3.0.1-src/tests/test2.c
|
||||
../src/gperf -k4 -t -l -I -K foreign_name < ../../gperf-3.0.1-src/tests/lang-ucs2.gperf > lu2inset.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o lu2out lu2inset.c test2.o
|
||||
testing UCS-2 encoded languages, all items should be found in the set
|
||||
./lu2out -v < ../../gperf-3.0.1-src/tests/lang-ucs2.in > lang-ucs2.out
|
||||
diff ../../gperf-3.0.1-src/tests/lang-ucs2.exp lang-ucs2.out
|
||||
testing SMTP keywords, case-insensitive
|
||||
../src/gperf --struct-type --readonly-table --enum --global -K field_name -N header_entry --ignore-case ../../gperf-3.0.1-src/tests/smtp.gperf > smtp.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o smtp smtp.c
|
||||
./smtp
|
||||
../src/gperf --struct-type --readonly-table --enum --global -K field_name -N header_entry --ignore-case --compare-strncmp ../../gperf-3.0.1-src/tests/smtp.gperf > smtp.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o smtp smtp.c
|
||||
./smtp
|
||||
../src/gperf --struct-type --readonly-table --enum --global -K field_name -N header_entry --ignore-case --compare-lengths ../../gperf-3.0.1-src/tests/smtp.gperf > smtp.c
|
||||
gcc -Wall -O3 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 -o smtp smtp.c
|
||||
./smtp
|
||||
../src/gperf -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,'$' < ../../gperf-3.0.1-src/tests/c-parse.gperf > c-parse.out
|
||||
diff ../../gperf-3.0.1-src/tests/c-parse.exp c-parse.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k'1,3,$' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k'1,3,$' */
|
||||
../src/gperf -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,'$' < ../../gperf-3.0.1-src/tests/objc.gperf > objc.out
|
||||
diff ../../gperf-3.0.1-src/tests/objc.exp objc.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */
|
||||
../src/gperf -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' < ../../gperf-3.0.1-src/tests/chill.gperf > chill.out
|
||||
diff ../../gperf-3.0.1-src/tests/chill.exp chill.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' */
|
||||
../src/gperf -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k1,4,7,'$' < ../../gperf-3.0.1-src/tests/cplusplus.gperf > cplusplus.out
|
||||
diff ../../gperf-3.0.1-src/tests/cplusplus.exp cplusplus.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k'1,4,7,$' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k'1,4,7,$' */
|
||||
../src/gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k1,3,'$' < ../../gperf-3.0.1-src/tests/java.gperf > java.out
|
||||
diff ../../gperf-3.0.1-src/tests/java.exp java.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */
|
||||
../src/gperf -n -k1-8 -l < ../../gperf-3.0.1-src/tests/modula2.gperf > modula2.out
|
||||
diff ../../gperf-3.0.1-src/tests/modula2.exp modula2.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -n -k1-8 -l */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -n -k1-8 -l */
|
||||
../src/gperf -D -t -k1,'$' < ../../gperf-3.0.1-src/tests/c-parse.gperf > test-4.out
|
||||
diff ../../gperf-3.0.1-src/tests/test-4.exp test-4.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -D -t -k'1,$' */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -D -t -k'1,$' */
|
||||
../src/gperf -g -o -j1 -t -N is_reserved_word < ../../gperf-3.0.1-src/tests/gpc.gperf > gpc.out
|
||||
diff ../../gperf-3.0.1-src/tests/gpc.exp gpc.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -g -o -j1 -t -N is_reserved_word */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -g -o -j1 -t -N is_reserved_word */
|
||||
../src/gperf -m5 < ../../gperf-3.0.1-src/tests/permut2.gperf > permut2.out
|
||||
diff ../../gperf-3.0.1-src/tests/permut2.exp permut2.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -m5 */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -m5 */
|
||||
../src/gperf -m5 < ../../gperf-3.0.1-src/tests/permut3.gperf > permut3.out
|
||||
diff ../../gperf-3.0.1-src/tests/permut3.exp permut3.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -m5 */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -m5 */
|
||||
../src/gperf -m5 --ignore-case < ../../gperf-3.0.1-src/tests/permutc2.gperf > permutc2.out
|
||||
diff ../../gperf-3.0.1-src/tests/permutc2.exp permutc2.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -m5 --ignore-case */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -m5 --ignore-case */
|
||||
../src/gperf -C -E -G -I -t < ../../gperf-3.0.1-src/tests/charsets.gperf > charsets.out
|
||||
diff ../../gperf-3.0.1-src/tests/charsets.exp charsets.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -C -E -G -I -t */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -C -E -G -I -t */
|
||||
../src/gperf -C -E -G -I -t < ../../gperf-3.0.1-src/tests/languages.gperf > languages.out
|
||||
diff ../../gperf-3.0.1-src/tests/languages.exp languages.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -C -E -G -I -t */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -C -E -G -I -t */
|
||||
../src/gperf -t < ../../gperf-3.0.1-src/tests/incomplete.gperf > incomplete.out
|
||||
diff ../../gperf-3.0.1-src/tests/incomplete.exp incomplete.out
|
||||
2c2
|
||||
< /* Command-line: ../src/gperf -t */
|
||||
---
|
||||
> /* Command-line: 'k:\\Devel\\gperf\\3.0.1\\gperf-3.0.1\\src\\gperf.exe' -t */
|
||||
../src/gperf -h > test-6.out
|
||||
diff ../../gperf-3.0.1-src/tests/test-6.exp test-6.out
|
||||
3c3
|
||||
< Usage: ../src/gperf [OPTION]... [INPUT-FILE]
|
||||
---
|
||||
> Usage: k:\Devel\gperf\3.0.1\gperf-3.0.1\src\gperf.exe [OPTION]... [INPUT-FILE]
|
||||
only if, do, for, case, goto, else, while, and return should be found
|
||||
./aout -v < ../../gperf-3.0.1-src/tests/c.gperf > test-7.out
|
||||
diff ../../gperf-3.0.1-src/tests/test-7.exp test-7.out
|
||||
make[1]: Leaving directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/tests'
|
||||
cd doc; make check
|
||||
make[1]: Entering directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/doc'
|
||||
make[1]: Niets te doen voor `check'.
|
||||
make[1]: Leaving directory `/cygdrive/k/Devel/gperf/3.0.1/gperf-3.0.1/doc'
|
|
@ -0,0 +1,21 @@
|
|||
../../gperf-3.0.1-src/tests/test.c: In function `main':
|
||||
../../gperf-3.0.1-src/tests/test.c:25: warning: implicit declaration of function `in_word_set'
|
||||
1 input keys have identical hash values, examine output carefully...
|
||||
../../gperf-3.0.1-src/tests/test2.c: In function `main':
|
||||
../../gperf-3.0.1-src/tests/test2.c:52: warning: implicit declaration of function `in_word_set'
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
8 input keys have identical hash values, examine output carefully...
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
||||
make[1]: [check-test] Fout 1 (genegeerd)
|
|
@ -0,0 +1,9 @@
|
|||
advapi32.dll
|
||||
gdi32.dll
|
||||
kernel32.dll
|
||||
libintl3.dll
|
||||
msvcrt.dll
|
||||
ntdll.dll
|
||||
ole32.dll
|
||||
rpcrt4.dll
|
||||
user32.dll
|
|
@ -0,0 +1,54 @@
|
|||
* LibIconv-1.9.2 for Windows *
|
||||
==============================
|
||||
|
||||
What is it?
|
||||
-----------
|
||||
LibIconv: convert between character encodings
|
||||
|
||||
Description
|
||||
-----------
|
||||
LibIconv converts from one character encoding to another through Unicode
|
||||
conversion (see Web page for full list of supported encodings). It has
|
||||
also limited support for transliteration, i.e. when a character cannot be
|
||||
represented in the target character set, it is approximated through one
|
||||
or several similar looking characters. It is useful if your application
|
||||
needs to support multiple character encodings, but that support lacks from
|
||||
your system.
|
||||
|
||||
- Libiconv-1 is in Libiconv-1.7
|
||||
|
||||
Homepage
|
||||
--------
|
||||
http://www.gnu.org/software/libiconv
|
||||
|
||||
System
|
||||
------
|
||||
- MS-Windows 95 / 98 / ME / NT / 2000 / XP with msvcrt.dll
|
||||
- if msvcrt.dll is not in your Windows/System folder, get it from
|
||||
Microsoft <http://support.microsoft.com/default.aspx?scid=kb;en-us;259403">
|
||||
or by installing Internet Explorer 4.0 or higher
|
||||
<http://www.microsoft.com/windows/ie>- libgw32c <http://gnuwin32.sourceforge.net/packages/libgw32c.htm> (for developing with LibIconv library)
|
||||
|
||||
Notes
|
||||
-----
|
||||
- Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
|
||||
|
||||
Package Availability
|
||||
--------------------
|
||||
- in: http://gnuwin32.sourceforge.net
|
||||
|
||||
Sources
|
||||
-------
|
||||
- libiconv-1.9.2-1-src.zip
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
The package has been compiled with GNU auto-tools, GNU make, and Mingw
|
||||
(GCC for MS-Windows). Any differences from the original sources are given
|
||||
in libiconv-1.9.2-1-GnuWin32.diffs in libiconv-1.9.2-1-src.zip. Libraries needed
|
||||
for compilation can be found at the lines starting with 'LIBS = ' in the
|
||||
Makefiles. Usually, these are standard libraries provided with Mingw, or
|
||||
libraries from the package itself; 'gw32c' refers to the libgw32c package,
|
||||
which provides MS-Windows substitutes or stubs for functions normally found in
|
||||
Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
|
||||
and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.
|
|
@ -0,0 +1,477 @@
|
|||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of February
|
||||
2003. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files az be bg ca cs da de el en en_GB eo es et fa fi
|
||||
+-------------------------------------------------+
|
||||
a2ps | [] [] [] [] [] |
|
||||
aegis | () |
|
||||
anubis | |
|
||||
ap-utils | |
|
||||
bash | [] [] [] |
|
||||
batchelor | |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] [] [] |
|
||||
clisp | |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | [] [] [] |
|
||||
darkstat | () [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
enscript | [] [] [] |
|
||||
error | [] [] [] [] |
|
||||
fetchmail | [] () [] [] [] |
|
||||
fileutils | [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
gas | [] |
|
||||
gawk | [] [] [] |
|
||||
gcal | [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gimp-print | |
|
||||
gliv | |
|
||||
gnucash | [] () |
|
||||
gnucash-glossary| [] () [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gpe-todo | |
|
||||
gphoto2 | [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () () |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
indent | [] [] [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] |
|
||||
kbd | [] [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] |
|
||||
libgpewidget | |
|
||||
libiconv | [] [] [] [] [] [] |
|
||||
lifelines | [] () |
|
||||
lilypond | [] |
|
||||
lingoteach | [] |
|
||||
lingoteach_lessons| () () |
|
||||
lynx | [] [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] [] |
|
||||
make | [] [] [] |
|
||||
man-db | [] () [] () |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] () [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | |
|
||||
recode | [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] |
|
||||
sketch | [] () [] |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] [] |
|
||||
tin | () () [] |
|
||||
util-linux | [] [] [] [] [] [] [] |
|
||||
vorbis-tools | [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] |
|
||||
xchat | |
|
||||
xpad | |
|
||||
+-------------------------------------------------+
|
||||
az be bg ca cs da de el en en_GB eo es et fa fi
|
||||
0 1 2 26 9 49 46 9 1 1 11 52 19 1 15
|
||||
|
||||
fr gl he hr hu id it ja ko lg lv ms nb nl
|
||||
+-------------------------------------------+
|
||||
a2ps | [] () () [] [] |
|
||||
aegis | () |
|
||||
anubis | [] [] |
|
||||
ap-utils | [] |
|
||||
bash | [] [] |
|
||||
batchelor | |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] [] |
|
||||
clisp | |
|
||||
coreutils | [] [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
darkstat | () [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] |
|
||||
gas | [] |
|
||||
gawk | [] [] |
|
||||
gcal | [] |
|
||||
gcc | [] |
|
||||
gettext | [] [] [] |
|
||||
gimp-print | |
|
||||
gliv | () |
|
||||
gnucash | [] [] [] |
|
||||
gnucash-glossary| [] [] |
|
||||
gnupg | [] [] [] [] [] |
|
||||
gpe-todo | |
|
||||
gphoto2 | [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () [] () () |
|
||||
grep | [] [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] [] |
|
||||
jpilot | [] () () |
|
||||
jwhois | [] [] [] [] |
|
||||
kbd | [] |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] |
|
||||
libgpewidget | |
|
||||
libiconv | [] [] [] [] [] [] |
|
||||
lifelines | () |
|
||||
lilypond | [] [] |
|
||||
lingoteach | [] |
|
||||
lingoteach_lessons| |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
mailutils | |
|
||||
make | [] [] [] [] [] [] [] |
|
||||
man-db | [] () () |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] [] [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | |
|
||||
recode | [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] |
|
||||
sketch | [] |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] () |
|
||||
tar | [] [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] |
|
||||
tin | |
|
||||
util-linux | [] [] () [] [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] |
|
||||
xchat | |
|
||||
xpad | |
|
||||
+-------------------------------------------+
|
||||
fr gl he hr hu id it ja ko lg lv ms nb nl
|
||||
59 23 8 10 26 20 18 26 8 0 1 8 7 24
|
||||
|
||||
nn no pl pt pt_BR ro ru sk sl sv tr uk zh_CN zh_TW
|
||||
+----------------------------------------------------+
|
||||
a2ps | () () () [] [] [] [] [] [] | 14
|
||||
aegis | () | 0
|
||||
anubis | [] [] | 4
|
||||
ap-utils | () () | 1
|
||||
bash | [] [] | 7
|
||||
batchelor | | 0
|
||||
bfd | [] [] | 6
|
||||
binutils | [] [] | 6
|
||||
bison | [] [] [] | 11
|
||||
clisp | | 5
|
||||
clisp | | 0
|
||||
coreutils | [] [] [] [] [] | 12
|
||||
cpio | [] [] [] [] [] | 13
|
||||
darkstat | [] [] () () | 6
|
||||
diffutils | [] [] [] [] [] [] | 19
|
||||
enscript | [] [] [] [] | 10
|
||||
error | [] [] [] [] | 11
|
||||
fetchmail | () () [] | 6
|
||||
fileutils | [] [] [] [] [] [] | 14
|
||||
findutils | [] [] [] [] [] [] [] [] | 24
|
||||
flex | [] [] [] [] | 10
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 7
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] [] [] | 14
|
||||
gimp-print | | 0
|
||||
gliv | [] | 1
|
||||
gnucash | [] [] [] [] [] | 9
|
||||
gnucash-glossary| [] [] [] [] | 8
|
||||
gnupg | [] [] [] [] | 16
|
||||
gpe-todo | | 0
|
||||
gphoto2 | [] [] | 7
|
||||
gprof | [] [] [] | 7
|
||||
gpsdrive | [] [] | 3
|
||||
grep | [] [] [] [] [] | 20
|
||||
gretl | | 2
|
||||
hello | [] [] [] [] [] [] [] [] [] | 31
|
||||
id-utils | [] [] [] [] | 9
|
||||
indent | [] [] [] [] [] | 17
|
||||
jpilot | () [] [] [] [] | 8
|
||||
jwhois | [] () () [] [] | 8
|
||||
kbd | [] [] | 6
|
||||
ld | [] [] | 5
|
||||
libc | [] [] [] [] [] [] [] | 20
|
||||
libgpewidget | | 0
|
||||
libiconv | [] [] [] [] [] [] | 18
|
||||
lifelines | [] | 2
|
||||
lilypond | [] | 4
|
||||
lingoteach | [] [] | 4
|
||||
lingoteach_lessons| () | 0
|
||||
lynx | [] [] [] [] | 13
|
||||
m4 | [] [] [] [] | 13
|
||||
mailutils | | 2
|
||||
make | [] [] [] [] [] | 15
|
||||
man-db | [] | 4
|
||||
mysecretdiary | [] [] [] | 8
|
||||
nano | [] [] [] | 13
|
||||
nano_1_0 | [] [] [] [] [] | 15
|
||||
opcodes | [] [] [] | 8
|
||||
parted | [] [] [] [] [] | 12
|
||||
ptx | [] [] [] [] [] [] [] | 20
|
||||
python | | 0
|
||||
radius | | 0
|
||||
recode | [] [] [] [] [] [] | 16
|
||||
sed | [] [] [] [] [] | 16
|
||||
sh-utils | [] [] [] | 12
|
||||
sharutils | [] [] [] [] | 16
|
||||
sketch | [] [] | 5
|
||||
soundtracker | [] | 7
|
||||
sp | [] | 3
|
||||
tar | [] [] [] [] [] [] [] [] [] | 24
|
||||
texinfo | [] [] [] [] | 12
|
||||
textutils | [] [] [] [] [] | 15
|
||||
tin | | 1
|
||||
util-linux | [] [] [] | 14
|
||||
vorbis-tools | [] | 4
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] [] [] | 15
|
||||
wget | [] [] [] [] [] [] [] [] | 24
|
||||
xchat | | 0
|
||||
xpad | | 0
|
||||
+----------------------------------------------------+
|
||||
43 teams nn no pl pt pt_BR ro ru sk sl sv tr uk zh_CN zh_TW
|
||||
82 domains 3 4 14 4 34 1 29 14 13 53 46 6 9 13 723
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If February 2003 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
||||
up-to-date matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
the use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Bruno Haible <bruno@clisp.org>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,64 @@
|
|||
While some other iconv(3) implementations - like FreeBSD iconv(3) - choose
|
||||
the "many small shared libraries" and dlopen(3) approach, this implementation
|
||||
packs everything into a single shared library. Here is a comparison of the
|
||||
two designs.
|
||||
|
||||
* Run-time efficiency
|
||||
1. A dlopen() based approach needs a cache of loaded shared libraries.
|
||||
Otherwise, every iconv_open() call will result in a call to dlopen()
|
||||
and thus to file system related system calls - which is prohibitive
|
||||
because some applications use the iconv_open/iconv/iconv_close sequence
|
||||
for every single filename, string, or piece of text.
|
||||
2. In terms of virtual memory use, both approaches are on par. Being shared
|
||||
libraries, the tables are shared between any processes that use them.
|
||||
And because of the demand loading used by Unix systems (and because libiconv
|
||||
does not have initialization functions), only those parts of the tables
|
||||
which are needed (typically very few kilobytes) will be read from disk and
|
||||
paged into main memory.
|
||||
3. Even with a cache of loaded shared libraries, the dlopen() based approach
|
||||
makes more system calls, because it has to load one or two shared libraries
|
||||
for every encoding in use.
|
||||
|
||||
* Total size
|
||||
In the dlopen(3) approach, every shared library has a symbol table and
|
||||
relocation offset. All together, FreeBSD iconv installs more than 200 shared
|
||||
libraries with a total size of 2.3 MB. Whereas libiconv installs 0.45 MB.
|
||||
|
||||
* Extensibility
|
||||
The dlopen(3) approach is good for guaranteeing extensibility if the iconv
|
||||
implementation is distributed without source. (Or when, as in glibc, you
|
||||
cannot rebuild iconv without rebuilding your libc, thus possibly
|
||||
destabilizing your system.)
|
||||
The libiconv package achieves extensibility through the LGPL license:
|
||||
Every user has access to the source of the package and can extend and
|
||||
replace just libiconv.so.
|
||||
The places which have to be modified when a new encoding is added are as
|
||||
follows: add an #include statement in iconv.c, add an entry in the table in
|
||||
iconv.c, and of course, update the README and iconv_open.3 manual page.
|
||||
|
||||
* Use within other packages
|
||||
If you want to incorporate an iconv implementation into another package
|
||||
(such as a mail user agent or web browser), the single library approach
|
||||
is easier, because:
|
||||
1. In the shared library approach you have to provide the right directory
|
||||
prefix which will be used at run time.
|
||||
2. Incorporating iconv as a static library into the executable is easy -
|
||||
it won't need dynamic loading. (This assumes that your package is under
|
||||
the LGPL or GPL license.)
|
||||
|
||||
|
||||
All conversions go through Unicode. This is possible because most of the
|
||||
world's characters have already been allocated in the Unicode standard.
|
||||
Therefore we have for each encoding two functions:
|
||||
- For conversion from the encoding to Unicode, a function called xxx_mbtowc.
|
||||
- For conversion from Unicode to the encoding, a function called xxx_wctomb,
|
||||
and for stateful encodings, a function called xxx_reset which returns to
|
||||
the initial shift state.
|
||||
|
||||
|
||||
All our functions operate on a single Unicode character at a time. This is
|
||||
obviously less efficient than operating on an entire buffer of characters at
|
||||
a time, but it makes the coding considerably easier and less bug-prone. Those
|
||||
who wish best performance should install the Real Thing (TM): GNU libc 2.1
|
||||
or newer.
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
New in 1.9:
|
||||
* Many more transliterations.
|
||||
* New configuration option --enable-relocatable. See the INSTALL.generic file
|
||||
for details.
|
||||
|
||||
New in 1.8:
|
||||
* The iconv program has new options -l, -c, -s.
|
||||
* The iconv program is internationalized.
|
||||
* Added C99 converter.
|
||||
* Added KOI8-T converter.
|
||||
* New configuration option --enable-extra-encodings that enables a bunch of
|
||||
additional encodings; see the README for details.
|
||||
* Updated the ISO-8859-16 converter.
|
||||
* Upgraded BIG5-HKSCS, EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to
|
||||
Unicode 3.2.
|
||||
* Upgraded EUC-KR, CP949, JOHAB converters to include the Euro sign.
|
||||
* Changed the ARMSCII-8 converter.
|
||||
* Extended the EUC-JP encoder so that YEN SIGN characters don't cause failures
|
||||
in Shift_JIS to EUC-JP conversion.
|
||||
* The JAVA converter now handles characters outside the Unicode BMP correctly.
|
||||
* Fixed a bug in the CP1255, CP1258, TCVN decoders: The base characters of
|
||||
combining characters could be dropped at the end of the conversion buffer.
|
||||
* Fixed a bug in the transliteration that could lead to excessive memory
|
||||
allocations in libintl when transliteration was needed.
|
||||
* Portability to BSD/OS and SCO 3.2.5.
|
||||
|
||||
New in 1.7:
|
||||
* Added UTF-32, UTF-32BE, UTF-32LE converters.
|
||||
* Changed CP1255, CP1258 and TCVN converters to handle combining characters.
|
||||
* Changed EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
|
||||
converters to use fullwidth Yen sign instead of halfwidth Yen sign, and
|
||||
fullwidth tilde instead of halfwidth tilde.
|
||||
* Upgraded EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to Unicode 3.1.
|
||||
* Changed the GB18030 converter to not reject unassigned and private-use
|
||||
Unicode characters.
|
||||
* Fixed a bug in the byte order mark treatment of the UCS-4 decoder.
|
||||
* The manual pages are now distributed also in HTML format.
|
||||
|
||||
New in 1.6:
|
||||
* The iconv program's -f and -t options are now optional.
|
||||
* Many more transliterations.
|
||||
* Added CP862 converter.
|
||||
* Changed the GB18030 converter.
|
||||
* Portability to DOS with DJGPP.
|
||||
|
||||
New in 1.5:
|
||||
* Added an iconv(1) program.
|
||||
* New locale dependent encodings "char", "wchar_t".
|
||||
* Transliteration is now off by default. Use a //TRANSLIT suffix to enable it.
|
||||
* The JOHAB encoding is documented again.
|
||||
* Changed a few mappings in the CP950 converter.
|
||||
|
||||
New in 1.4:
|
||||
* Added GB18030, BIG5HKSCS converters.
|
||||
* Portability to OS/2 with emx+gcc.
|
||||
|
||||
New in 1.3:
|
||||
* Added UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE converters.
|
||||
* Fixed the definition of EILSEQ on SunOS4.
|
||||
* Fixed a build problem on OSF/1.
|
||||
* Support for building as a shared library on Woe32.
|
||||
|
||||
New in 1.2:
|
||||
* Added UTF-16BE and UTF-16LE converters.
|
||||
* Changed the UTF-16 encoder.
|
||||
* Fixed the treatment of tab characters in the UTF-7 converter.
|
||||
* Fixed an internal error when output buffer was not large enough.
|
||||
|
||||
New in 1.1:
|
||||
* Added ISO-8859-16 converter.
|
||||
* Added CP932 converter, a variant of SHIFT_JIS.
|
||||
* Added CP949 converter, a variant of EUC-KR.
|
||||
* Improved the ISO-2022-CN-EXT converter: It now covers the ISO-IR-165 range.
|
||||
* Updated the ISO-8859-8 conversion table.
|
||||
* The JOHAB encoding is deprecated and not documented any more.
|
||||
* Fixed two build problems: 1. "make -n check" failed. 2. When libiconv was
|
||||
already installed, "make" failed.
|
||||
|
||||
New in 1.0:
|
||||
* Added transliteration facilities.
|
||||
* Added a test suite.
|
||||
* Fixed the iconv(3) manual page and function: the return value was not
|
||||
described correctly.
|
||||
* Fixed a bug in the CP1258 decoder: invalid bytes now yield EILSEQ instead of
|
||||
U+FFFD.
|
||||
* Fixed a bug in the Georgian-PS encoder: accept U+00E6.
|
||||
* Fixed a bug in the EUC-JP encoder: reject 0x8E5C and 0x8E7E.
|
||||
* Fixed a bug in the KSC5601 and JOHAB converters: they recognized some Hangul
|
||||
characters at some invalid code positions.
|
||||
* Fixed a bug in the EUC-TW decoder; it was severely broken.
|
||||
* Fixed a bug in the CP950 converter: it recognized a dubious BIG5 range.
|
||||
|
||||
New in 0.3:
|
||||
* Reduced the size of the tables needed for the JOHAB converter.
|
||||
* Portability to Woe32.
|
||||
|
||||
New in 0.2:
|
||||
* Added KOI8-RU, CP850, CP866, CP874, CP950, ISO-2022-CN-EXT, GBK and
|
||||
ISO-2022-JP-1 converters.
|
||||
* Added MACINTOSH as an alias for MAC-ROMAN.
|
||||
* Added ASMO-708 as an alias for ISO-8859-6.
|
||||
* Added ELOT_928 as an alias for ISO-8859-7.
|
||||
* Improved the EUC-TW converter: Treat CNS 11643 plane 3.
|
||||
* Improved the ISO-2022-KR and EUC-KR converters: Hangul characters are
|
||||
decomposed into Jamo when needed.
|
||||
* Improved the CP932 converter.
|
||||
* Updated the CP1133, MULELAO-1 and ARMSCII-8 mappings.
|
||||
* The EUC-JP and SHIFT_JIS converters now cover the user-defined range.
|
||||
* Fixed a possible buffer overrun in the JOHAB converter.
|
||||
* Fixed a bug in the UTF-7, ISO-2022-*, HZ decoders: a shift sequence a the
|
||||
end of the input no longer gives an error.
|
||||
* The HZ encoder now always terminates its output in the ASCII state.
|
||||
* Use a perfect hash table for looking up the aliases.
|
||||
|
||||
New in 0.1:
|
||||
* Portability to Linux/glibc-2.0.x, Linux/libc5, OSF/1, FreeBSD.
|
||||
* Fixed a bug in the EUC-JP decoder. Extended the ISO-2022-JP-2 converter.
|
||||
* Made TIS-620 mapping consistent with glibc-2.1.
|
||||
|
|
@ -0,0 +1,392 @@
|
|||
Q: Why does libiconv support encoding XXX? Why does libiconv not support
|
||||
encoding ZZZ?
|
||||
|
||||
A: libiconv, as an internationalization library, supports those character
|
||||
sets and encodings which are in wide-spread use in at least one territory
|
||||
of the world.
|
||||
|
||||
Hint1: On http://www.w3c.org/International/O-charset-lang.html you find a
|
||||
page "Languages, countries, and the charsets typically used for them".
|
||||
From this table, we can conclude that the following are in active use:
|
||||
|
||||
ISO-8859-1, CP1252 Afrikaans, Albanian, Basque, Catalan, Danish, Dutch,
|
||||
English, Faroese, Finnish, French, Galician, German,
|
||||
Icelandic, Irish, Italian, Norwegian, Portuguese,
|
||||
Scottish, Spanish, Swedish
|
||||
ISO-8859-2 Croatian, Czech, Hungarian, Polish, Romanian, Slovak,
|
||||
Slovenian
|
||||
ISO-8859-3 Esperanto, Maltese
|
||||
ISO-8859-5 Bulgarian, Byelorussian, Macedonian, Russian,
|
||||
Serbian, Ukrainian
|
||||
ISO-8859-6 Arabic
|
||||
ISO-8859-7 Greek
|
||||
ISO-8859-8 Hebrew
|
||||
ISO-8859-9, CP1254 Turkish
|
||||
ISO-8859-10 Inuit, Lapp
|
||||
ISO-8859-13 Latvian, Lithuanian
|
||||
ISO-8859-15 Estonian
|
||||
KOI8-R Russian
|
||||
SHIFT_JIS Japanese
|
||||
ISO-2022-JP Japanese
|
||||
EUC-JP Japanese
|
||||
|
||||
Ordered by frequency on the web (1997):
|
||||
ISO-8859-1, CP1252 96%
|
||||
SHIFT_JIS 1.6%
|
||||
ISO-2022-JP 1.2%
|
||||
EUC-JP 0.4%
|
||||
CP1250 0.3%
|
||||
CP1251 0.2%
|
||||
CP850 0.1%
|
||||
MACINTOSH 0.1%
|
||||
ISO-8859-5 0.1%
|
||||
ISO-8859-2 0.0%
|
||||
|
||||
Hint2: The character sets mentioned in the XFree86 4.0 locale.alias file.
|
||||
|
||||
ISO-8859-1 Afrikaans, Basque, Breton, Catalan, Danish, Dutch,
|
||||
English, Estonian, Faroese, Finnish, French,
|
||||
Galician, German, Greenlandic, Icelandic,
|
||||
Indonesian, Irish, Italian, Lithuanian, Norwegian,
|
||||
Occitan, Portuguese, Scottish, Spanish, Swedish,
|
||||
Walloon, Welsh
|
||||
ISO-8859-2 Albanian, Croatian, Czech, Hungarian, Polish,
|
||||
Romanian, Serbian, Slovak, Slovenian
|
||||
ISO-8859-3 Esperanto
|
||||
ISO-8859-4 Estonian, Latvian, Lithuanian
|
||||
ISO-8859-5 Bulgarian, Byelorussian, Macedonian, Russian,
|
||||
Serbian, Ukrainian
|
||||
ISO-8859-6 Arabic
|
||||
ISO-8859-7 Greek
|
||||
ISO-8859-8 Hebrew
|
||||
ISO-8859-9 Turkish
|
||||
ISO-8859-14 Breton, Irish, Scottish, Welsh
|
||||
ISO-8859-15 Basque, Breton, Catalan, Danish, Dutch, Estonian,
|
||||
Faroese, Finnish, French, Galician, German,
|
||||
Greenlandic, Icelandic, Irish, Italian, Lithuanian,
|
||||
Norwegian, Occitan, Portuguese, Scottish, Spanish,
|
||||
Swedish, Walloon, Welsh
|
||||
KOI8-R Russian
|
||||
KOI8-U Russian, Ukrainian
|
||||
EUC-JP (alias eucJP) Japanese
|
||||
ISO-2022-JP (alias JIS7) Japanese
|
||||
SHIFT_JIS (alias SJIS) Japanese
|
||||
U90 Japanese
|
||||
S90 Japanese
|
||||
EUC-CN (alias eucCN) Chinese
|
||||
EUC-TW (alias eucTW) Chinese
|
||||
BIG5 Chinese
|
||||
EUC-KR (alias eucKR) Korean
|
||||
ARMSCII-8 Armenian
|
||||
GEORGIAN-ACADEMY Georgian
|
||||
GEORGIAN-PS Georgian
|
||||
TIS-620 (alias TACTIS) Thai
|
||||
MULELAO-1 Laothian
|
||||
IBM-CP1133 Laothian
|
||||
VISCII Vietnamese
|
||||
TCVN Vietnamese
|
||||
NUNACOM-8 Inuktitut
|
||||
|
||||
Hint3: The character sets supported by Netscape Communicator 4.
|
||||
|
||||
Where is this documented? For the complete picture, I had to use
|
||||
"strings netscape" and then a lot of guesswork. For a quick take,
|
||||
look at the "View - Character set" menu of Netscape Communicator 4.6:
|
||||
|
||||
ISO-8859-{1,2,5,7,9,15}
|
||||
WINDOWS-{1250,1251,1253}
|
||||
KOI8-R Cyrillic
|
||||
CP866 Cyrillic
|
||||
Autodetect Japanese (EUC-JP, ISO-2022-JP, ISO-2022-JP-2, SJIS)
|
||||
EUC-JP Japanese
|
||||
SHIFT_JIS Japanese
|
||||
GB2312 Chinese
|
||||
BIG5 Chinese
|
||||
EUC-TW Chinese
|
||||
Autodetect Korean (EUC-KR, ISO-2022-KR, but not JOHAB)
|
||||
|
||||
UTF-8
|
||||
UTF-7
|
||||
|
||||
Hint4: The character sets supported by Microsoft Internet Explorer 4.
|
||||
|
||||
ISO-8859-{1,2,3,4,5,6,7,8,9}
|
||||
WINDOWS-{1250,1251,1252,1253,1254,1255,1256,1257}
|
||||
KOI8-R Cyrillic
|
||||
KOI8-RU Ukrainian
|
||||
ASMO-708 Arabic
|
||||
EUC-JP Japanese
|
||||
ISO-2022-JP Japanese
|
||||
SHIFT_JIS Japanese
|
||||
GB2312 Chinese
|
||||
HZ-GB-2312 Chinese
|
||||
BIG5 Chinese
|
||||
EUC-KR Korean
|
||||
ISO-2022-KR Korean
|
||||
WINDOWS-874 Thai
|
||||
WINDOWS-1258 Vietnamese
|
||||
|
||||
UTF-8
|
||||
UTF-7
|
||||
UNICODE actually UNICODE-LITTLE
|
||||
UNICODEFEFF actually UNICODE-BIG
|
||||
|
||||
and various DOS character sets: DOS-720, DOS-862, IBM852, CP866.
|
||||
|
||||
We take the union of all these four sets. The result is:
|
||||
|
||||
European and Semitic languages
|
||||
* ASCII.
|
||||
We implement this because it is occasionally useful to know or to
|
||||
check whether some text is entirely ASCII (i.e. if the conversion
|
||||
ISO-8859-x -> UTF-8 is trivial).
|
||||
* ISO-8859-{1,2,3,4,5,6,7,8,9,10}
|
||||
We implement this because they are widely used. Except ISO-8859-4
|
||||
which appears to have been superseded by ISO-8859-13 in the baltic
|
||||
countries. But it's an ISO standard anyway.
|
||||
* ISO-8859-13
|
||||
We implement this because it's a standard in Lithuania and Latvia.
|
||||
* ISO-8859-14
|
||||
We implement this because it's an ISO standard.
|
||||
* ISO-8859-15
|
||||
We implement this because it's increasingly used in Europe, because
|
||||
of the Euro symbol.
|
||||
* ISO-8859-16
|
||||
We implement this because it's an ISO standard.
|
||||
* KOI8-R, KOI8-U
|
||||
We implement this because it appears to be the predominant encoding
|
||||
on Unix in Russia and Ukraine, respectively.
|
||||
* KOI8-RU
|
||||
We implement this because MSIE4 supports it.
|
||||
* KOI8-T
|
||||
We implement this because it is the locale encoding in glibc's Tajik
|
||||
locale.
|
||||
* CP{1250,1251,1252,1253,1254,1255,1256,1257}
|
||||
We implement these because they are the predominant Windows encodings
|
||||
in Europe.
|
||||
* CP850
|
||||
We implement this because it is mentioned as occurring in the web
|
||||
in the aforementioned statistics.
|
||||
* CP862
|
||||
We implement this because Ron Aaron says it is sometimes used in web
|
||||
pages and emails.
|
||||
* CP866
|
||||
We implement this because Netscape Communicator does.
|
||||
* Mac{Roman,CentralEurope,Croatian,Romania,Cyrillic,Greek,Turkish} and
|
||||
Mac{Hebrew,Arabic}
|
||||
We implement these because the Sun JDK does, and because Mac users
|
||||
don't deserve to be punished.
|
||||
* Macintosh
|
||||
We implement this because it is mentioned as occurring in the web
|
||||
in the aforementioned statistics.
|
||||
Japanese
|
||||
* EUC-JP, SHIFT_JIS, ISO-2022-JP
|
||||
We implement these because they are widely used. EUC-JP and SHIFT_JIS
|
||||
are more used for files, whereas ISO-2022-JP is recommended for email.
|
||||
* CP932
|
||||
We implement this because it is the Microsoft variant of SHIFT_JIS,
|
||||
used on Windows.
|
||||
* ISO-2022-JP-2
|
||||
We implement this because it's the common way to represent mails which
|
||||
make use of JIS X 0212 characters.
|
||||
* ISO-2022-JP-1
|
||||
We implement this because it's in the RFCs, but I don't think it is
|
||||
really used.
|
||||
* U90, S90
|
||||
We DON'T implement this because I have no informations about what it
|
||||
is or who uses it.
|
||||
Simplified Chinese
|
||||
* EUC-CN = GB2312
|
||||
We implement this because it is the widely used representation
|
||||
of simplified Chinese.
|
||||
* GBK
|
||||
We implement this because it appears to be used on Solaris and Windows.
|
||||
* GB18030
|
||||
We implement this because it is an official requirement in the
|
||||
People's Republic of China.
|
||||
* ISO-2022-CN
|
||||
We implement this because it is in the RFCs, but I have no idea
|
||||
whether it is really used.
|
||||
* ISO-2022-CN-EXT
|
||||
We implement this because it's in the RFCs, but I don't think it is
|
||||
really used.
|
||||
* HZ = HZ-GB-2312
|
||||
We implement this because the RFCs recommend it for Usenet postings,
|
||||
and because MSIE4 supports it.
|
||||
Traditional Chinese
|
||||
* EUC-TW
|
||||
We implement it because it appears to be used on Unix.
|
||||
* BIG5
|
||||
We implement it because it is the de-facto standard for traditional
|
||||
Chinese.
|
||||
* CP950
|
||||
We implement this because it is the Microsoft variant of BIG5, used
|
||||
on Windows.
|
||||
* BIG5+
|
||||
We DON'T implement this because it doesn't appear to be in wide use.
|
||||
Only the CWEX fonts use this encoding. Furthermore, the conversion
|
||||
tables in the big5p package are not coherent: If you convert directly,
|
||||
you get different results than when you convert via GBK.
|
||||
* BIG5-HKSCS
|
||||
We implement it because it is the de-facto standard for traditional
|
||||
Chinese in Hongkong.
|
||||
Korean
|
||||
* EUC-KR
|
||||
We implement these because they appear to be the widely used
|
||||
representations for Korean.
|
||||
* CP949
|
||||
We implement this because it is the Microsoft variant of EUC-KR, used
|
||||
on Windows.
|
||||
* ISO-2022-KR
|
||||
We implement it because it is in the RFCs and because MSIE4 supports
|
||||
it, but I have no idea whether it's really used.
|
||||
* JOHAB
|
||||
We implement this because it is apparently used on Windows as a locale
|
||||
encoding (codepage 1361).
|
||||
* ISO-646-KR
|
||||
We DON'T implement this because although an old ASCII variant, its
|
||||
glyph for 0x7E is not clear: RFC 1345 and unicode.org's JOHAB.TXT
|
||||
say it's a tilde, but Ken Lunde's "CJKV information processing" says
|
||||
it's an overline. And it is not ISO-IR registered.
|
||||
Armenian
|
||||
* ARMSCII-8
|
||||
We implement it because XFree86 supports it.
|
||||
Georgian
|
||||
* Georgian-Academy, Georgian-PS
|
||||
We implement these because they appear to be both used for Georgian;
|
||||
Xfree86 supports them.
|
||||
Thai
|
||||
* TIS-620
|
||||
We implement this because it seems to be standard for Thai.
|
||||
* CP874
|
||||
We implement this because MSIE4 supports it.
|
||||
* MacThai
|
||||
We implement this because the Sun JDK does, and because Mac users
|
||||
don't deserve to be punished.
|
||||
Laotian
|
||||
* MuleLao-1, CP1133
|
||||
We implement these because XFree86 supports them. I have no idea which
|
||||
one is used more widely.
|
||||
Vietnamese
|
||||
* VISCII, TCVN
|
||||
We implement these because XFree86 supports them.
|
||||
* CP1258
|
||||
We implement this because MSIE4 supports it.
|
||||
Other languages
|
||||
* NUNACOM-8 (Inuktitut)
|
||||
We DON'T implement this because it isn't part of Unicode yet, and
|
||||
therefore doesn't convert to anything except itself.
|
||||
Platform specifics
|
||||
* HP-ROMAN8, NEXTSTEP
|
||||
We implement these because they were the native character set on HPs
|
||||
and NeXTs for a long time, and libiconv is intended to be usable on
|
||||
these old machines.
|
||||
Full Unicode
|
||||
* UTF-8, UCS-2, UCS-4
|
||||
We implement these. Obviously.
|
||||
* UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE
|
||||
We implement these because they are the preferred internal
|
||||
representation of strings in Unicode aware applications. These are
|
||||
non-ambiguous names, known to glibc. (glibc doesn't have
|
||||
UCS-2-INTERNAL and UCS-4-INTERNAL.)
|
||||
* UTF-16, UTF-16BE, UTF-16LE
|
||||
We implement these, because UTF-16 is still the favourite encoding of
|
||||
the president of the Unicode Consortium (for political reasons), and
|
||||
because they appear in RFC 2781.
|
||||
* UTF-32, UTF-32BE, UTF-32LE
|
||||
We implement these because they are part of Unicode 3.1.
|
||||
* UTF-7
|
||||
We implement this because it is essential functionality for mail
|
||||
applications.
|
||||
* C99
|
||||
We implement it because it's used for C and C++ programs and because
|
||||
it's a nice encoding for debugging.
|
||||
* JAVA
|
||||
We implement it because it's used for Java programs and because it's
|
||||
a nice encoding for debugging.
|
||||
* UNICODE (big endian), UNICODEFEFF (little endian)
|
||||
We DON'T implement these because they are stupid and not standardized.
|
||||
Full Unicode, in terms of `uint16_t' or `uint32_t'
|
||||
(with machine dependent endianness and alignment)
|
||||
* UCS-2-INTERNAL, UCS-4-INTERNAL
|
||||
We implement these because they are the preferred internal
|
||||
representation of strings in Unicode aware applications.
|
||||
|
||||
Q: Support encodings mentioned in RFC 1345 ?
|
||||
A: No, they are not in use any more. Supporting ISO-646 variants is pointless
|
||||
since ISO-8859-* have been adopted.
|
||||
|
||||
Q: Support EBCDIC ?
|
||||
A: No!
|
||||
|
||||
Q: How do I add a new character set?
|
||||
A: 1. Explain the "why" in this file, above.
|
||||
2. You need to have a conversion table from/to Unicode. Transform it into
|
||||
the format used by the mapping tables found on ftp.unicode.org: each line
|
||||
contains the character code, in hex, with 0x prefix, then whitespace,
|
||||
then the Unicode code point, in hex, 4 hex digits, with 0x prefix. '#'
|
||||
counts as a comment delimiter until end of line.
|
||||
Please also send your table to Mark Leisher <mleisher@crl.nmsu.edu> so he
|
||||
can include it in his collection.
|
||||
3. If it's an 8-bit character set, use the '8bit_tab_to_h' program in the
|
||||
tools directory to generate the C code for the conversion. You may tweak
|
||||
the resulting C code if you are not satisfied with its quality, but this
|
||||
is rarely needed.
|
||||
If it's a two-dimensional character set (with rows and columns), use the
|
||||
'cjk_tab_to_h' program in the tools directory to generate the C code for
|
||||
the conversion. You will need to modify the main() function to recognize
|
||||
the new character set name, with the proper dimensions, but that shouldn't
|
||||
be too hard. This yields the CCS. The CES you have to write by hand.
|
||||
4. Store the resulting C code file in the lib directory. Add a #include
|
||||
directive to converters.h, and add an entry to the encodings.def file.
|
||||
5. Compile the package, and test your new encoding using a program like
|
||||
iconv(1) or clisp(1).
|
||||
6. Augment the testsuite: Add a line to each of tests/Makefile.in,
|
||||
tests/Makefile.msvc and tests/Makefile.os2. For a stateless encoding,
|
||||
create the complete table as a TXT file. For a stateful encoding,
|
||||
provide a text snippet encoded using your new encoding and its UTF-8
|
||||
equivalent.
|
||||
7. Update the README and man/iconv_open.3, to mention the new encoding.
|
||||
Add a note in the NEWS file.
|
||||
|
||||
Q: What about bidirectional text? Should it be tagged or reversed when
|
||||
converting from ISO-8859-8 or ISO-8859-6 to Unicode? Qt appears to do
|
||||
this, see qt-2.0.1/src/tools/qrtlcodec.cpp.
|
||||
A: After reading RFC 1556: I don't think so. Support for ISO-8859-8-I and
|
||||
ISO-8859-E remains to be implemented.
|
||||
On the other hand, a page on www.w3c.org says that ISO-8859-8 in *email*
|
||||
is visually encoded, ISO-8859-8 in *HTML* is logically encoded, i.e.
|
||||
the same as ISO-8859-8-I. I'm confused.
|
||||
|
||||
Other character sets not implemented:
|
||||
"MNEMONIC" = "csMnemonic"
|
||||
"MNEM" = "csMnem"
|
||||
"ISO-10646-UCS-Basic" = "csUnicodeASCII"
|
||||
"ISO-10646-Unicode-Latin1" = "csUnicodeLatin1" = "ISO-10646"
|
||||
"ISO-10646-J-1"
|
||||
"UNICODE-1-1" = "csUnicode11"
|
||||
"csWindows31Latin5"
|
||||
|
||||
Other aliases not implemented (and not implemented in glibc-2.1 either):
|
||||
From MSIE4:
|
||||
ISO-8859-1: alias ISO8859-1
|
||||
ISO-8859-2: alias ISO8859-2
|
||||
KSC_5601: alias KS_C_5601
|
||||
UTF-8: aliases UNICODE-1-1-UTF-8 UNICODE-2-0-UTF-8
|
||||
|
||||
|
||||
Q: How can I integrate libiconv into my package?
|
||||
A: Just copy the entire libiconv package into a subdirectory of your package.
|
||||
At configuration time, call libiconv's configure script with the
|
||||
appropriate --srcdir option and maybe --enable-static or --disable-shared.
|
||||
Then "cd libiconv && make && make install-lib libdir=... includedir=...".
|
||||
'install-lib' is a special (not GNU standardized) target which installs
|
||||
only the include file - in $(includedir) - and the library - in $(libdir) -
|
||||
and does not use other directory variables. After "installing" libiconv
|
||||
in your package's build directory, building of your package can proceed.
|
||||
|
||||
Q: Why is the testsuite so big?
|
||||
A: Because some of the tests are very comprehensive.
|
||||
If you don't feel like using the testsuite, you can simply remove the
|
||||
tests/ directory.
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
* Linux with libc6 (glibc-2.1):
|
||||
OK
|
||||
|
||||
* Linux with libc6 (glibc-2.0.7):
|
||||
OK
|
||||
|
||||
* Linux with libc5:
|
||||
OK
|
||||
|
||||
* Solaris 2.7:
|
||||
OK
|
||||
|
||||
* Solaris 2.6:
|
||||
OK
|
||||
|
||||
* OSF/1 5.1:
|
||||
OK
|
||||
|
||||
* OSF/1 4.0d:
|
||||
OK
|
||||
|
||||
* Irix 6.5:
|
||||
OK
|
||||
|
||||
* HP-UX 10.20:
|
||||
OK
|
||||
|
||||
* AIX 4.2:
|
||||
OK
|
||||
|
||||
* SunOS 4:
|
||||
OK when configured --enable-static --disable-shared
|
||||
(gcc cannot create shared libraries without relocations)
|
||||
|
||||
* FreeBSD 3.3:
|
||||
OK
|
||||
|
||||
* BeOS 5:
|
||||
OK
|
||||
|
||||
* Woe32 with MSVC 4.0:
|
||||
OK
|
||||
|
||||
* Woe32 with MSVC 5.0:
|
||||
OK
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
GNU LIBICONV - character set conversion library
|
||||
|
||||
This library provides an iconv() implementation, for use on systems which
|
||||
don't have one, or whose implementation cannot convert from/to Unicode.
|
||||
|
||||
It provides support for the encodings:
|
||||
|
||||
European languages
|
||||
ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
|
||||
KOI8-R, KOI8-U, KOI8-RU,
|
||||
CP{1250,1251,1252,1253,1254,1257}, CP{850,866},
|
||||
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
|
||||
Mac{Cyrillic,Ukraine,Greek,Turkish},
|
||||
Macintosh
|
||||
Semitic languages
|
||||
ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
|
||||
Japanese
|
||||
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
|
||||
Chinese
|
||||
EUC-CN, HZ, GBK, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS,
|
||||
ISO-2022-CN, ISO-2022-CN-EXT
|
||||
Korean
|
||||
EUC-KR, CP949, ISO-2022-KR, JOHAB
|
||||
Armenian
|
||||
ARMSCII-8
|
||||
Georgian
|
||||
Georgian-Academy, Georgian-PS
|
||||
Tajik
|
||||
KOI8-T
|
||||
Thai
|
||||
TIS-620, CP874, MacThai
|
||||
Laotian
|
||||
MuleLao-1, CP1133
|
||||
Vietnamese
|
||||
VISCII, TCVN, CP1258
|
||||
Platform specifics
|
||||
HP-ROMAN8, NEXTSTEP
|
||||
Full Unicode
|
||||
UTF-8
|
||||
UCS-2, UCS-2BE, UCS-2LE
|
||||
UCS-4, UCS-4BE, UCS-4LE
|
||||
UTF-16, UTF-16BE, UTF-16LE
|
||||
UTF-32, UTF-32BE, UTF-32LE
|
||||
UTF-7
|
||||
C99, JAVA
|
||||
Full Unicode, in terms of `uint16_t' or `uint32_t'
|
||||
(with machine dependent endianness and alignment)
|
||||
UCS-2-INTERNAL, UCS-4-INTERNAL
|
||||
Locale dependent, in terms of `char' or `wchar_t'
|
||||
(with machine dependent endianness and alignment, and with OS and
|
||||
locale dependent semantics)
|
||||
char, wchar_t
|
||||
The empty encoding name "" is equivalent to "char": it denotes the
|
||||
locale dependent character encoding.
|
||||
|
||||
When configured with the option --enable-extra-encodings, it also provides
|
||||
support for a few extra encodings:
|
||||
|
||||
European languages
|
||||
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
|
||||
Semitic languages
|
||||
CP864
|
||||
Japanese
|
||||
EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
|
||||
Turkmen
|
||||
TDS565
|
||||
Platform specifics
|
||||
RISCOS-LATIN1
|
||||
|
||||
It can convert from any of these encodings to any other, through Unicode
|
||||
conversion.
|
||||
|
||||
It has also some limited support for transliteration, i.e. when a character
|
||||
cannot be represented in the target character set, it can be approximated
|
||||
through one or several similarly looking characters. Transliteration is
|
||||
activated when "//TRANSLIT" is appended to the target encoding name.
|
||||
|
||||
libiconv is for you if your application needs to support multiple character
|
||||
encodings, but that support lacks from your system.
|
||||
|
||||
Installation:
|
||||
|
||||
As usual for GNU packages:
|
||||
|
||||
$ ./configure --prefix=/usr/local
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
After installing GNU libiconv for the first time, it is recommended to
|
||||
recompile and reinstall GNU gettext, so that it can take advantage of
|
||||
libiconv.
|
||||
|
||||
On systems other than GNU/Linux, the iconv program will be internationalized
|
||||
only if GNU gettext has been built and installed before GNU libiconv. This
|
||||
means that the first time GNU libiconv is installed, we have a circular
|
||||
dependency between the GNU libiconv and GNU gettext packages, which can be
|
||||
resolved by building and installing either
|
||||
- first libiconv, then gettext, then libiconv again,
|
||||
or (on systems supporting shared libraries, excluding AIX)
|
||||
- first gettext, then libiconv, then gettext again.
|
||||
Recall that before building a package for the second time, you need to erase
|
||||
the traces of the first build by running "make distclean".
|
||||
|
||||
This library can be built and installed in two variants:
|
||||
|
||||
- The library mode. This works on all systems, and uses a library
|
||||
`libiconv.so' and a header file `<iconv.h>'. (Both are installed
|
||||
through "make install".)
|
||||
|
||||
To use it, simply #include <iconv.h> and use the functions.
|
||||
|
||||
To use it in an autoconfiguring package:
|
||||
- If you don't use automake, append m4/iconv.m4 to your aclocal.m4
|
||||
file.
|
||||
- If you do use automake, add m4/iconv.m4 to your m4 macro repository.
|
||||
- Add to the link command line of libraries and executables that use
|
||||
the functions the placeholder @LIBICONV@ (or, if using libtool for
|
||||
the link, @LTLIBICONV@). If you use automake, the right place for
|
||||
these additions are the *_LDADD variables.
|
||||
Note that 'iconv.m4' is also part of the GNU gettext package, which
|
||||
installs it in /usr/local/share/aclocal/iconv.m4.
|
||||
|
||||
- The libc plug/override mode. This works on GNU/Linux, Solaris and OSF/1
|
||||
systems only. It is a way to get good iconv support without having
|
||||
glibc-2.1.
|
||||
It installs a library `libiconv_plug.so'. This library can be used with
|
||||
LD_PRELOAD, to override the iconv* functions present in the C library.
|
||||
|
||||
On GNU/Linux and Solaris:
|
||||
$ export LD_PRELOAD=/usr/local/lib/libiconv_plug.so
|
||||
|
||||
On OSF/1:
|
||||
$ export _RLD_LIST=/usr/local/lib/libiconv_plug.so:DEFAULT
|
||||
|
||||
A program's source need not be modified, the program need not even be
|
||||
recompiled. Just set the LD_PRELOAD environment variable, that's it!
|
||||
|
||||
|
||||
Distribution:
|
||||
ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.2.tar.gz
|
||||
|
||||
Homepage:
|
||||
http://www.gnu.org/software/libiconv/
|
||||
|
||||
Bug reports to:
|
||||
<bug-gnu-libiconv@gnu.org>
|
||||
|
||||
|
||||
Bruno Haible <bruno@clisp.org>
|
|
@ -0,0 +1,13 @@
|
|||
Thanks to for
|
||||
|
||||
Edmund Grimley Evans <edmundo@rano.org> bug reports
|
||||
|
||||
Taro Muraoka <koron@tka.att.ne.jp> Woe32 DLL support
|
||||
|
||||
Akira Hatakeyama <akira@sra.co.jp> OS/2 support
|
||||
|
||||
Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>
|
||||
DOS/DJGPP support
|
||||
|
||||
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> advice on EUC-JP and JISX0213
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
This is a port of GNU Libiconv 1.8 to MSDOS/DJGPP.
|
||||
|
||||
1.: DJGPP specific changes.
|
||||
=======================
|
||||
There are no DJGPP specific changes. This package should
|
||||
configure and compile out-of-the-box.
|
||||
Please read the documentation to become familiar with this
|
||||
product.
|
||||
|
||||
|
||||
2.: Installing the binary package.
|
||||
==============================
|
||||
|
||||
2.1.: Copy the binary distribution into the top DJGPP installation
|
||||
directory and unzip the binary distribution running *ONE* of
|
||||
the following commands:
|
||||
unzip32 licv18b.zip or
|
||||
djtarx licv18b.zip or
|
||||
pkunzip -d licv18b.zip
|
||||
|
||||
|
||||
|
||||
3.: Building the binaries from sources.
|
||||
===================================
|
||||
|
||||
3.1.: To build the binaries you will need the following binary packages:
|
||||
djdev203.zip, bsh204b.zip, gcc2952b.zip,
|
||||
bnu210b.zip, mak3791b.zip, fil316b.zip,
|
||||
shl112b.zip, txt20b.zip, txi40b.zip,
|
||||
grep24b.zip and sed302b.zip
|
||||
|
||||
|
||||
All this packages can be found in the v2gnu directory of any
|
||||
Simtel.NET mirror.
|
||||
You will need bsh204b.zip and *NOT* a prior version or the build will fail.
|
||||
The same applies to djdev203.zip. You *MUST* use the updated versions of
|
||||
fil316b.zip (date: 2000-05-30) and shl112b.zip (date: 2000-08-11). This
|
||||
updated versions have been recompiled with djdev203.zip and know about
|
||||
the "/dev/env" functionality introduced with djdev203.zip. All the other
|
||||
packages are the ones I have used to build the binaries from this sources.
|
||||
Previuos and/or later versions of this packages may do the job as well but
|
||||
I have not tested this.
|
||||
|
||||
3.2.: Create a temporary directory and copy the source package: licv18s.zip
|
||||
into the temporary directory. If you download the source distribution
|
||||
from one of the DJGPP archives, just unzip it preserving the directory
|
||||
structure, runnig ONE of the following commands:
|
||||
unzip32 licv18s.zip or
|
||||
djtarx licv18s.zip or
|
||||
pkunzip -d licv18s.zip
|
||||
|
||||
Source distributions downloaded from one of the GNU FTP sites need
|
||||
some more work to unpack. First, you MUST use the `djtar' program to
|
||||
unzip the package. That's because some file names in the official
|
||||
distributions need to be changed to avoid problems on the various
|
||||
platforms supported by DJGPP. `djtar' can rename files on the fly
|
||||
given a file with name mappings. The distribution includes a file
|
||||
`djgpp/fnchange.lst' with the necessary mappings. So you need first
|
||||
to retrieve that file, and then invoke `djtar' to unpack the
|
||||
distribution. Here's how:
|
||||
|
||||
djtar -x -p -o libiconv-1.7/djgpp/fnchange.lst libiconv-1.7.tar.gz > lst
|
||||
djtar -x -n lst libiconv-1.7.tar.gz
|
||||
|
||||
(The name of the distribution archive and the top-level directory will
|
||||
be different for versions other than 1.7.)
|
||||
|
||||
3.3.: The package is preconfigured for djdev203. To build the products you
|
||||
should run the following command:
|
||||
make
|
||||
|
||||
After the compilation has finished, you can check the products
|
||||
running the command:
|
||||
make check
|
||||
|
||||
To install the products run the command:
|
||||
make install
|
||||
|
||||
This will install the products (iconv.exe iconv.h localcharset.h libconv.a
|
||||
libcharset.a iconv.1 iconv.3 iconv_open.3 iconv_close.3) into your DJGPP
|
||||
installation tree. As usual, prefix is defined as "/dev/env/DJDIR".
|
||||
If you prefer to install into same other directory run the command:
|
||||
make install prefix=z:/some/other/dir
|
||||
|
||||
Of course, you should replace "z:/some/other/dir" by an appropriate path
|
||||
that will meet your requeriments.
|
||||
|
||||
3.4.: If you need/want to reconfigure the package you will have to run the
|
||||
following commands:
|
||||
make distclean
|
||||
djgpp\config
|
||||
|
||||
Please note that you *MUST* use the "distclean" option or the config.cache
|
||||
file will *NOT* be deleted. In this case you are *NOT* reconfiguring
|
||||
because the configuration informations is read from the cache file instead
|
||||
of being newly computed.
|
||||
To build the programs in a directory other than where the sources are,
|
||||
you must add the parameter that specifies the source directory,
|
||||
e.g:
|
||||
x:\src\gnu\libiconv.18\djgpp\config x:/src/gnu/libiconv.18
|
||||
|
||||
Lets assume you want to build the binaries in a directory placed on a
|
||||
different drive (z:\build in this case) from where the sources are,
|
||||
then you will run the following commands:
|
||||
z:
|
||||
md \build
|
||||
cd \build
|
||||
x:\src\gnu\libiconv.18\djgpp\config x:/src/gnu/libiconv.18
|
||||
|
||||
You *MUST* use forward slashes to specify the source directory.
|
||||
After having configured the package run the folowing commands to create
|
||||
the binaries and docs and install them:
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
Send suggestions and bug reports concerning the DJGPP port to
|
||||
comp.os.msdos.djgpp or djgpp@delorie.com. Libiconv specific bugs
|
||||
must be reported to Bruno Haible <haible@clisp.cons.org>.
|
||||
|
||||
|
||||
Guerrero, Juan Manuel <st001906@hrz1.hrz.tu-darmstadt.de>
|
|
@ -0,0 +1,64 @@
|
|||
2003-05-10 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* iconv_string.c (iconv_string): Don't return -1 just because the
|
||||
string is longer than 4 KB.
|
||||
|
||||
2002-02-13 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* iconv.m4: Remove file. Obsoleted by m4/iconv.m4.
|
||||
|
||||
2000-06-16 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4: Change prefix to AM.
|
||||
|
||||
2001-05-23 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Accept --with-libiconv-prefix option.
|
||||
|
||||
2001-03-23 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Tweak printing of prototype.
|
||||
|
||||
2001-03-20 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Recommend GNU libiconv.
|
||||
|
||||
2001-01-03 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Also check whether the iconv declaration
|
||||
has const.
|
||||
|
||||
2000-02-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4: New file.
|
||||
|
||||
2001-01-29 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* locale_charset.c: Remove file. Obsoleted by libcharset.
|
||||
|
||||
2000-10-22 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* locale_charset.c (get_locale_charset): Accept french and spanish
|
||||
names in both ISO-8859-1 and UTF-8.
|
||||
|
||||
2000-08-24 Jim Blackson <blackson@ontrack-japan.com>
|
||||
|
||||
* iconv_string.c (iconv_string): Fix return value for autodetect.
|
||||
|
||||
2000-01-24 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv_string.c (iconv_string): Stop recognizing JOHAB.
|
||||
Fix typo for EUC-JP.
|
||||
|
||||
1999-12-18 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* locale_charset.c (get_locale_charset): Recognize more language codes:
|
||||
"af" (afrikaans), "ca" (catalan), "eu" (basque), "fo" (faeroese),
|
||||
"ga" (irish), "gd" (scottish), "gl" (galician), "sq" (albanian),
|
||||
"eo" (esperanto), "mt" (maltese), "be" (byelorussian),
|
||||
"et" (estonian), "lt" (lithuanian), "lv" (latvian), "uk" (ukrainian).
|
||||
Recognize more aliases: "english", "slovenian", "macedonian",
|
||||
"serbian", "arabic".
|
||||
Change default: KOI8-R for "ru" (russian) instead of ISO-8859-5,
|
||||
ISO-8859-5 for "sr" instead of ISO-8859-2.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Bruno Haible <bruno@clisp.org>
|
|
@ -0,0 +1,322 @@
|
|||
2003-06-18 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config/install-sh: Update from automake-1.7.5.
|
||||
|
||||
2003-06-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.devel (config.h_vms): Remove INSTALLPREFIX.
|
||||
Reported by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
|
||||
|
||||
2003-05-19 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* windows/charset.rc: Include <winver.h>.
|
||||
Reported by Perry Rapp.
|
||||
|
||||
2003-05-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.vms: New file.
|
||||
* Makefile.devel (config.h_vms): New rule.
|
||||
(all): Depend on it.
|
||||
|
||||
2003-05-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* m4/libtool.m4: Update from GNU gettext, based on libtool-1.5.
|
||||
|
||||
2003-05-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* autoconf/config.guess: Update to GNU version 2003-02-22.
|
||||
* autoconf/config.sub: Likewise.
|
||||
|
||||
2003-05-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* autoconf/ltmain.sh: Update from GNU gettext, based on libtool-1.5.
|
||||
|
||||
2003-04-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* configure.in (mandir): Change default value.
|
||||
* Makefile.in (datadir): New variable.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Support for relocatable installation.
|
||||
* autoconf/config.libpath: New file, from GNU gettext.
|
||||
* configure.in: Invoke AC_RELOCATABLE_LIBRARY.
|
||||
* include/libcharset.h.in: New file.
|
||||
* Makefile.devel (include/libcharset.h.msvc-shared): New rule.
|
||||
(all): Depend on it.
|
||||
(autoconf/aclocal.m4): Update aclocal invocation.
|
||||
(config.h.msvc): Handle INSTALLPREFIX.
|
||||
* Makefile.in (include/libcharset.h): New rule.
|
||||
(all): Depend on it.
|
||||
(install-lib, install): Also install libcharset.h.
|
||||
(uninstall): Uninstall libcharset.h.
|
||||
(distclean, maintainer-clean): Remove include/libcharset.h.
|
||||
* Makefile.msvc (all): Create include/libcharset.h.
|
||||
(install): Also install libcharset.h.
|
||||
(uninstall): Uninstall libcharset.h.
|
||||
(mostlyclean, clean, distclean, maintainer-clean): Remove
|
||||
include/libcharset.h.
|
||||
* INSTALL.generic: Document --enable-relocatable and
|
||||
--with-libintl-prefix. Remove the recommendation to set CPPFLAGS and
|
||||
LDFLAGS. The lib-link.m4 macros make this unnecessary.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.msvc (PREFIX): New variable.
|
||||
(prefix): Use it.
|
||||
(distclean, maintainer-clean): Drop Unix specific removals.
|
||||
* man/Makefile.msvc (PREFIX): New variable.
|
||||
(prefix): Use it.
|
||||
(clean): Drop unnecessary removals.
|
||||
(distclean): Drop Unix specific removal.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* configure.in: Invoke AM_LANGINFO_CODESET, not jm_LANGINFO_CODESET.
|
||||
* autoconf/ltmain.sh: Update from GNU gettext.
|
||||
2003-02-18 Bruno Haible <bruno@clisp.org>
|
||||
Fix the 2002-09-16 fix.
|
||||
* ltmain.sh (install): If "ln -s -f" fails (this is the case
|
||||
with /usr/bin/ln on Solaris 2.7), fall back to "rm && ln -s".
|
||||
|
||||
2003-03-17 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Improved MSVC support.
|
||||
* windows/charset.rc: New file.
|
||||
* Makefile.msvc (prefix): Use less Unixy value.
|
||||
(local_prefix): Remove variable.
|
||||
(libdir, includedir): Use backslashes.
|
||||
(bindir): New variable.
|
||||
(mandir): Remove variable.
|
||||
(INSTALL, INSTALL_PROGRAM, INSTALL_DATA): New variables.
|
||||
(mostlyclean, clean): Remove config.h and include/localcharset.h.
|
||||
(install, installdirs, uninstall): Rewritten.
|
||||
* README.woe32: Mention automatic installation command.
|
||||
|
||||
Rename libcharset.h to localcharset.h.
|
||||
* include/localcharset.h.in: Renamed from include/libcharset.h.in.
|
||||
* tools/locale_charset.c: Include localcharset.h, not libcharset.h.
|
||||
* Makefile.in (include/localcharset.h): Renamed from
|
||||
include/libcharset.h.
|
||||
(all): Update dependency.
|
||||
(install-lib, install, uninstall, distclean, maintainer-clean): Update.
|
||||
* Makefile.msvc (all): Create include/localcharset.h, not
|
||||
include/libcharset.h.
|
||||
* Makefile.devel (include/localcharset.h.msvc-shared): Renamed from
|
||||
include/libcharset.h.msvc-shared.
|
||||
(all): Update dependency.
|
||||
(config.h.in): Touch the file when done; autoheader doesn't do it.
|
||||
(config.h.msvc): Make rule more robust.
|
||||
* INTEGRATE: Mention localcharset.h only once.
|
||||
* djgpp/README.in, djgpp/README: Update.
|
||||
* djgpp/config.bat: Update.
|
||||
* djgpp/config.sed: Update.
|
||||
* djgpp/fnchange.in, djgpp/fnchange.lst: Update.
|
||||
* configure.in (VERSION): Bump to 1.2.
|
||||
* NEWS: New file.
|
||||
|
||||
2003-02-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.devel (AUTOCONF): Switch to autoconf-2.57.
|
||||
(configure, config.h.in): Update rules.
|
||||
|
||||
2003-01-03 Albert Chin <libtool@thewrittenword.com>
|
||||
|
||||
* autoconf/ltmain.sh: Don't pass -R flags found in a .la's
|
||||
dependency_libs variable directly down to the linker.
|
||||
Reported by Tim Mooney <mooney@dogbert.cc.ndsu.nodak.edu>.
|
||||
|
||||
2003-01-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* INTEGRATE: Mention localcharset.h.
|
||||
|
||||
2003-01-01 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.in (mkinstalldirs): Renamed from MKINSTALLDIRS.
|
||||
(install-lib, install, installdirs): Use it.
|
||||
|
||||
2002-09-27 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* autoconf/mkinstalldirs: Upgrade to automake-1.7.2 version.
|
||||
|
||||
2002-11-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* autoconf/ltmain.sh: Upgrade to libtool-1.4.3.
|
||||
|
||||
2002-06-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* configure.in: Use new AC_* names of libtool macros. Invoke
|
||||
AC_LIBTOOL_WIN32_DLL.
|
||||
|
||||
2002-11-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Make "make install" without prior "make" work.
|
||||
* Makefile.in (install): Depend on include/libcharset.h.
|
||||
Reported by Martin Mokrejš <mmokrejs@natur.cuni.cz>.
|
||||
|
||||
2002-05-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* tools/all-charsets: Update for change of lib/config.charset.
|
||||
|
||||
2002-05-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.devel (AUTOCONF): New variable.
|
||||
(configure): Use the AUTOCONF variable.
|
||||
|
||||
2002-05-08 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* README.woe32: Renamed from README.win32.
|
||||
|
||||
2002-02-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* m4/libtool.m4: Upgrade to libtool-1.4.2.
|
||||
* autoconf/ltmain.sh: Likewise.
|
||||
|
||||
2002-02-02 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* autoconf/ltmain.sh: Add DESTDIR support on ELF systems.
|
||||
|
||||
2001-11-03 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* autoconf/ltmain.sh: chmod 777 the .libs directory, so that
|
||||
"make install" succeeds.
|
||||
|
||||
2001-12-04 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* INTEGRATE: Change the install rule to not create $(libdir) if
|
||||
there is no file to install in it.
|
||||
|
||||
2001-07-17 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* configure.in (VERSION): Bump to 1.1.
|
||||
|
||||
2001-06-08 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* m4/libtool.m4: Upgrade to libtool-1.4.
|
||||
* autoconf/ltmain.sh: Likewise.
|
||||
* autoconf/ltconfig: Remove file.
|
||||
|
||||
2001-06-08 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* autoconf/config.guess: Update to GNU version 2001-05-11.
|
||||
* autoconf/config.sub: Likewise.
|
||||
|
||||
2001-05-21 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (include/libcharset.h): New target.
|
||||
(all): Depend on it.
|
||||
|
||||
2001-05-11 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* INTEGRATE (Makefile.in): Fix syntax error.
|
||||
|
||||
2001-05-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc (config.h): Allow the 'del' command to fail.
|
||||
|
||||
2001-03-21 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* INSTALL.generic (Particular Systems): Add recommendations for AIX 3.
|
||||
|
||||
2001-03-10 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* INSTALL.generic: New section "Particular Systems".
|
||||
|
||||
2001-03-05 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* tools/all-charsets: Update for change of lib/config.charset.
|
||||
|
||||
2001-03-01 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* tools/all-charsets: Update for change of lib/config.charset.
|
||||
|
||||
2001-02-25 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* autoconf/ltconfig:
|
||||
sed -e 's/reload object files/produce relocatable object files/'.
|
||||
|
||||
2001-02-25 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* include/libcharset.h.in (locale_charset): Return value is never
|
||||
NULL any more.
|
||||
|
||||
2001-02-22 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* INTEGRATE (Makefile.am): Change $@-t to t-$@. For DJGPP.
|
||||
Patch by Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>.
|
||||
|
||||
2001-02-20 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
Better support for DOS/Windows platforms.
|
||||
* autoconf/ltconfig: Upgrade to libtool-1.3.5.
|
||||
* autoconf/ltmain.sh: Likewise.
|
||||
* m4/libtool.m4: Likewise.
|
||||
* autoconf/aclocal.m4: Likewise.
|
||||
* configure.in: Call AC_OBJEXT and AC_EXEEXT.
|
||||
|
||||
2001-02-20 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (libdir, includedir, mandir): Use the autoconf
|
||||
determined value, in order to respect the configure arguments.
|
||||
* lib/Makefile.in (libdir): Likewise.
|
||||
|
||||
2000-12-13 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* autoconf/install-sh: Update to a newer version from fileutils.
|
||||
|
||||
2000-12-12 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in: Use $(MAKE) instead of $(MAKE) -r. Needed with Solaris
|
||||
"make", which doesn't set MAKE as expected by @SET_MAKE@ if -r is
|
||||
given. Reported by Toshimitsu Fujiwara.
|
||||
|
||||
2000-12-08 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (exec_prefix): Use configure's --exec-prefix argument.
|
||||
|
||||
2000-12-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc (check): Depend on target 'force' as well.
|
||||
(mostlyclean, clean, distclean, maintainer-clean): Fix dependency.
|
||||
|
||||
* Makefile.msvc: Replace STATIC with its opposite flag, DLL.
|
||||
|
||||
2000-11-24 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* tools/all-charsets: Update for 2000-10-31 change of
|
||||
lib/config.charset.
|
||||
|
||||
2000-11-23 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (install-lib): Fix for builddir != srcdir.
|
||||
|
||||
2000-11-22 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (all): Fix for builddir != srcdir.
|
||||
|
||||
2000-11-21 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* include/libcharset.h.in: Renamed from include/libcharset.h.
|
||||
* windows/dllexport.h: New file.
|
||||
* Makefile.devel (all): Add config.h.msvc,
|
||||
include/libcharset.h.msvc-shared.
|
||||
(config.h.msvc, include/libcharset.h.msvc-shared): New targets.
|
||||
* Makefile.msvc (MFLAGS): New variable.
|
||||
(all): Create include\libcharset.h.
|
||||
(distclean, maintainer-clean): Remove include\libcharset.h.
|
||||
* Makefile.in (CP): New variable.
|
||||
(all): Create include/libcharset.h.
|
||||
(distclean, maintainer-clean): Remove include/libcharset.h.
|
||||
|
||||
2000-11-18 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.devel (config.h.in): Rename from config.h.
|
||||
|
||||
2000-11-16 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in: After "cd", use "&&" not ";".
|
||||
|
||||
2000-10-31 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc: New file.
|
||||
* README.win32: New file.
|
|
@ -0,0 +1,2 @@
|
|||
New in 1.2:
|
||||
* The include file is renamed from "libcharset.h" to "localcharset.h".
|
|
@ -0,0 +1,60 @@
|
|||
LIBCHARSET - portable character set determination library
|
||||
|
||||
This library provides a function which determines the character set / encoding
|
||||
of text in the currently selected locale (the LC_CTYPE locale facet).
|
||||
|
||||
It is useful for portable programs which need to process text in other
|
||||
encodings and locales than the currently selected one. Possible uses:
|
||||
|
||||
* Use of Unicode in POSIX compliant applications.
|
||||
* Conversion of text between the current locale's encoding and UTF-8 (or
|
||||
any other given encoding).
|
||||
* Mail agents.
|
||||
|
||||
In theory, this would be very simple: The Single Unix Specification (SUSV2)
|
||||
provides the nl_langinfo function, in such a way that
|
||||
|
||||
nl_langinfo (CODESET)
|
||||
|
||||
returns the encoding name. But the nl_langinfo function still does not exist
|
||||
on some systems, and on those where it exists it returns unstandardized
|
||||
variations of the encoding names, like (on Solaris) "PCK" for "Shift_JIS".
|
||||
|
||||
This library fixes these flaws and provides a function
|
||||
|
||||
const char * locale_charset (void);
|
||||
|
||||
It determines the current locale's character encoding, and canonicalizes it
|
||||
into one of the canonical names listed in config.charset. The result must
|
||||
not be freed; it is statically allocated. If the canonical name cannot be
|
||||
determined, the result is a non-canonical name.
|
||||
|
||||
|
||||
Installation:
|
||||
|
||||
As usual for GNU packages:
|
||||
|
||||
$ ./configure --prefix=/usr/local
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
|
||||
This library is used in
|
||||
GNU sh-utils, fileutils, textutils
|
||||
GNU gettext
|
||||
GNU clisp
|
||||
|
||||
|
||||
To integrate this library into your package:
|
||||
See file INTEGRATE.
|
||||
|
||||
|
||||
Distribution:
|
||||
The libcharset directory of
|
||||
ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
|
||||
|
||||
Homepage:
|
||||
http://www.haible.de/bruno/packages-libcharset.html
|
||||
|
||||
|
||||
Bruno Haible <bruno@clisp.org>
|
|
@ -0,0 +1,123 @@
|
|||
This is a port of GNU Libiconv 1.7 to MSDOS/DJGPP.
|
||||
|
||||
1.: DJGPP specific changes.
|
||||
=======================
|
||||
There are no DJGPP specific changes. This package should
|
||||
configure and compile out-of-the-box.
|
||||
Please read the documentation to become familiar with this
|
||||
product.
|
||||
|
||||
|
||||
2.: Installing the binary package.
|
||||
==============================
|
||||
|
||||
2.1.: Copy the binary distribution into the top DJGPP installation
|
||||
directory and unzip the binary distribution running *ONE* of
|
||||
the following commands:
|
||||
unzip32 licv16b.zip or
|
||||
djtarx licv16b.zip or
|
||||
pkunzip -d licv16b.zip
|
||||
|
||||
|
||||
|
||||
3.: Building the binaries from sources.
|
||||
===================================
|
||||
|
||||
3.1.: To build the binaries you will need the following binary packages:
|
||||
djdev203.zip, bsh204b.zip, gcc2952b.zip,
|
||||
bnu210b.zip, mak3791b.zip, fil316b.zip,
|
||||
shl112b.zip, txt20b.zip, txi40b.zip,
|
||||
grep24b.zip and sed302b.zip
|
||||
|
||||
|
||||
All this packages can be found in the v2gnu directory of any
|
||||
Simtel.NET mirror.
|
||||
You will need bsh204b.zip and *NOT* a prior version or the build will fail.
|
||||
The same applies to djdev203.zip. You *MUST* use the updated versions of
|
||||
fil316b.zip (date: 2000-05-30) and shl112b.zip (date: 2000-08-11). This
|
||||
updated versions have been recompiled with djdev203.zip and know about
|
||||
the "/dev/env" functionality introduced with djdev203.zip. All the other
|
||||
packages are the ones I have used to build the binaries from this sources.
|
||||
Previuos and/or later versions of this packages may do the job as well but
|
||||
I have not tested this.
|
||||
|
||||
3.2.: Create a temporary directory and copy the source package: licv16s.zip
|
||||
into the temporary directory. If you download the source distribution
|
||||
from one of the DJGPP archives, just unzip it preserving the directory
|
||||
structure, runnig ONE of the following commands:
|
||||
unzip32 licv16s.zip or
|
||||
djtarx licv16s.zip or
|
||||
pkunzip -d licv16s.zip
|
||||
|
||||
Source distributions downloaded from one of the GNU FTP sites need
|
||||
some more work to unpack. First, you MUST use the `djtar' program to
|
||||
unzip the package. That's because some file names in the official
|
||||
distributions need to be changed to avoid problems on the various
|
||||
platforms supported by DJGPP. `djtar' can rename files on the fly
|
||||
given a file with name mappings. The distribution includes a file
|
||||
`djgpp/fnchange.lst' with the necessary mappings. So you need first
|
||||
to retrieve that file, and then invoke `djtar' to unpack the
|
||||
distribution. Here's how:
|
||||
|
||||
djtar -x -p -o libiconv-1.7/djgpp/fnchange.lst libiconv-1.7.tar.gz > lst
|
||||
djtar -x -n lst libiconv-1.7.tar.gz
|
||||
|
||||
(The name of the distribution archive and the top-level directory will
|
||||
be different for versions other than 1.7.)
|
||||
|
||||
|
||||
3.3.: The package is preconfigured for djdev203. To build the products you
|
||||
should run the following command:
|
||||
make
|
||||
|
||||
After the compilation has finished, you can check the products
|
||||
running the command:
|
||||
make check
|
||||
|
||||
To install the products run the command:
|
||||
make install
|
||||
|
||||
This will install the products (iconv.exe iconv.h localcharset.h libconv.a
|
||||
libcharset.a iconv.1 iconv.3 iconv_open.3 iconv_close.3) into your DJGPP
|
||||
installation tree. As usual, prefix is defined as "/dev/env/DJDIR".
|
||||
If you prefer to install into same other directory run the command:
|
||||
make install prefix=z:/some/other/dir
|
||||
|
||||
Of course, you should replace "z:/some/other/dir" by an appropriate path
|
||||
that will meet your requeriments.
|
||||
|
||||
3.4.: If you need/want to reconfigure the package you will have to run the
|
||||
following commands:
|
||||
make distclean
|
||||
djgpp\config
|
||||
|
||||
Please note that you *MUST* use the "distclean" option or the config.cache
|
||||
file will *NOT* be deleted. In this case you are *NOT* reconfiguring
|
||||
because the configuration informations is read from the cache file instead
|
||||
of being newly computed.
|
||||
To build the programs in a directory other than where the sources are,
|
||||
you must add the parameter that specifies the source directory,
|
||||
e.g:
|
||||
x:\src\gnu\libiconv.16\djgpp\config x:/src/gnu/libiconv.16
|
||||
|
||||
Lets assume you want to build the binaries in a directory placed on a
|
||||
different drive (z:\build in this case) from where the sources are,
|
||||
then you will run the following commands:
|
||||
z:
|
||||
md \build
|
||||
cd \build
|
||||
x:\src\gnu\libiconv.16\djgpp\config x:/src/gnu/libiconv.16
|
||||
|
||||
You *MUST* use forward slashes to specify the source directory.
|
||||
After having configured the package run the folowing commands to create
|
||||
the binaries and docs and install them:
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
Send suggestions and bug reports concerning the DJGPP port to
|
||||
comp.os.msdos.djgpp or djgpp@delorie.com. Libiconv specific bugs
|
||||
must be reported to Bruno Haible <haible@clisp.cons.org>.
|
||||
|
||||
|
||||
Guerrero, Juan Manuel <st001906@hrz1.hrz.tu-darmstadt.de>
|
|
@ -0,0 +1,302 @@
|
|||
2004-01-21 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Upgrade from gettext-0.14.
|
||||
|
||||
2004-01-21 Bruno Haible <bruno@clisp.org>
|
||||
* config.charset: Add support for MacOS X (Darwin).
|
||||
|
||||
2003-12-02 Bruno Haible <bruno@clisp.org>
|
||||
* config.charset: Treat the new country name CS like the old country
|
||||
name YU.
|
||||
|
||||
2003-08-20 Bruno Haible <bruno@clisp.org>
|
||||
* config.charset (linux-gnulibc1*): Change hr_HR, ro_RO to ISO-8859-2.
|
||||
Reported by Alain Guibert <derogaton+bgli@oreka.com>.
|
||||
|
||||
2003-08-14 Bruno Haible <bruno@clisp.org>
|
||||
* config.charset: Add support for Linux libc5. Based on data from
|
||||
Alain Guibert <derogaton+bgli@oreka.com>.
|
||||
|
||||
2003-06-27 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Avoid use of *_unlocked functions on Solaris 2.5.1.
|
||||
* localcharset.c: Test HAVE_DECL_GETC_UNLOCKED, not HAVE_GETC_UNLOCKED.
|
||||
Reported by Eric Botcazou <ebotcazou@libertysurf.fr>.
|
||||
|
||||
2003-08-20 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset (linux-gnulibc1*): Change hr_HR, ro_RO to ISO-8859-2.
|
||||
Reported by Alain Guibert <derogaton+bgli@oreka.com>.
|
||||
|
||||
2003-08-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset: Add support for Linux libc5. Based on data from
|
||||
Alain Guibert <derogaton+bgli@oreka.com>.
|
||||
|
||||
2003-08-01 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* relocatable.c (find_shared_library_fullname): Disable the code on
|
||||
Linux/libc5. Reported by Alain Guibert <derogaton+bgli@oreka.com>.
|
||||
|
||||
2003-06-22 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Portability to mingw32.
|
||||
* relocatable.c [WIN32]: Include <windows.h>.
|
||||
Reported by Jeff Bonggren <jbon@cfl.rr.com>.
|
||||
|
||||
2003-06-22 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* relocatable.c (compute_curr_prefix): Comment out this function in
|
||||
the case when it is not used.
|
||||
Reported by Pavel Roskin <proski@gnu.org>.
|
||||
|
||||
2003-06-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Support for relocatable data files even on VMS.
|
||||
* Makefile.vms (bindir): New variable.
|
||||
(DEFS): Add flags for relocatability.
|
||||
Reported by Jouk Jansen <joukj@hrem.stm.tudelft.nl>.
|
||||
|
||||
2003-06-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Support for relocatable data files even on Woe32.
|
||||
* Makefile.msvc (IIPREFIX, IIprefix, IIexec_prefix, IIbindir,
|
||||
IIlibdir): New variables.
|
||||
(PICFLAGS): Also define PIC. Define BUILDING_* flags here.
|
||||
(CFLAGS): ... not here. Add flags for relocatability.
|
||||
|
||||
2003-05-18 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.msvc (DEBUGFLAGS): New variable.
|
||||
(charset.lib): Use it.
|
||||
|
||||
2003-05-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.vms: New file.
|
||||
|
||||
2003-04-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* lib/localcharset.c (get_charset_aliases): Add special case for VMS.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Support for relocatable installation.
|
||||
* relocatable.h: New file, from GNU gettext.
|
||||
* relocatable.c: New file, from GNU gettext.
|
||||
* localcharset.c: Update from GNU gettext.
|
||||
2003-02-28 Bruno Haible <bruno@clisp.org>
|
||||
* localcharset.c: Include relocatable.h.
|
||||
(get_charset_aliases): Relocate LIBDIR value.
|
||||
* localcharset.c: Drop C linkage declaration.
|
||||
* Makefile.in (DEFS): New variable.
|
||||
(SOURCES): Add relocatable.c.
|
||||
(OBJECTS): Add relocatable.lo.
|
||||
(localcharset.lo): Use $(DEFS).
|
||||
(relocatable.lo): New rule.
|
||||
* Makefile.msvc (CFLAGS): Remove $(PICFLAGS).
|
||||
(INCLUDES): Simplify.
|
||||
(SOURCES): Remove variable.
|
||||
(OBJECTS): Add relocatable.obj.
|
||||
(localcharset.obj): Add $(PICFLAGS).
|
||||
(relocatable.obj): New rule.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.msvc (PREFIX): New variable.
|
||||
(prefix): Use it.
|
||||
(clean): Drop Unix specific removal.
|
||||
|
||||
2003-03-17 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Improved MSVC support.
|
||||
* Makefile.msvc (prefix): Use less Unixy value.
|
||||
(local_prefix): Remove variable.
|
||||
(libdir): Use backslashes.
|
||||
(bindir): New variable.
|
||||
(INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Set to real values.
|
||||
(RESOURCES): Enable charset.res.
|
||||
(charset.lib): Set the target library name explicitly.
|
||||
(charset.res): New rule.
|
||||
(install, installdirs, uninstall): New rules.
|
||||
|
||||
Rename libcharset.h to localcharset.h.
|
||||
* localcharset.c: Include localcharset.h.
|
||||
* localcharset.h: Remove file.
|
||||
* Makefile.in (INCLUDES): Add -I../include.
|
||||
* Makefile.msvc (INCLUDES): Add -I../include.
|
||||
|
||||
2003-01-29 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset: Add an alias for CP1251 on Solaris.
|
||||
Reported by Hidetoshi Tajima <hidetoshi.tajima@sun.com>.
|
||||
|
||||
2003-01-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.h: New file.
|
||||
* localcharset.c: Include it.
|
||||
|
||||
2003-01-01 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.in (mkinstalldirs): Renamed from MKINSTALLDIRS.
|
||||
(install-lib, install, installdirs): Use it.
|
||||
|
||||
2002-05-09 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset: Update for newest glibc. Add canonical names
|
||||
ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
|
||||
|
||||
2002-05-09 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.c (get_charset_aliases): Add more Windows specific
|
||||
aliases.
|
||||
|
||||
2002-05-08 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* config.charset: A few additions for Solaris.
|
||||
|
||||
2002-02-15 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset [msdosdjgpp]: For Russian, use CP866.
|
||||
|
||||
2002-02-11 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* config.charset: Add support for NetBSD.
|
||||
|
||||
2002-01-10 Andrew Zabolotny <zap@cobra.ru>
|
||||
Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.c: Rework OS/2 support.
|
||||
* config.charset: Add OS/2 support.
|
||||
|
||||
2001-12-21 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.c (ISSLASH): Provide definition for DOS-like systems.
|
||||
|
||||
2001-12-15 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.c: Add OS/2 support.
|
||||
|
||||
2001-12-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* localcharset.c (locale_charset): Don't return an empty string.
|
||||
|
||||
2001-10-23 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: msdos in uk_UA uses CP1125.
|
||||
|
||||
2001-08-05 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
|
||||
* localcharset.c (locale_charset): Declare as extern "C".
|
||||
(get_charset_aliases): Cast malloc and realloc results to 'char *'.
|
||||
|
||||
2001-06-27 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (clean): Remove also *.o.lock, left there by libtool
|
||||
on IRIX.
|
||||
|
||||
2001-06-25 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (localcharset.lo): Mention $(INCLUDES) before $(CFLAGS)
|
||||
and $(CPPFLAGS).
|
||||
* Makefile.msvc (localcharset.obj): Likewise.
|
||||
|
||||
2001-06-24 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Change canonical name of BIG5HKSCS to BIG5-HKSCS.
|
||||
Change canonical name of SJIS to SHIFT_JIS.
|
||||
|
||||
2001-05-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc (charset.lib): Allow the 'del' command to fail.
|
||||
|
||||
2001-05-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (CPPFLAGS, LDFLAGS): New variables.
|
||||
(libcharset.la): Use LDFLAGS.
|
||||
(localcharset.lo): Use CPPFLAGS.
|
||||
|
||||
2001-04-30 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
Silence "gcc -Wall -Wwrite-strings" warnings.
|
||||
* localcharset.c (charset_aliases): Change type to 'const char *'.
|
||||
(get_charset_aliases): Change type of 'cp' to 'const char *'.
|
||||
|
||||
2001-03-10 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
|
||||
alias if codeset is empty.
|
||||
* config.charset (BeOS): Use wildcard syntax.
|
||||
|
||||
* Makefile.in (libcharset.la): Pass flag -no-undefined. Needed on
|
||||
platforms like BeOS.
|
||||
|
||||
* Makefile.in (RM): New variable.
|
||||
|
||||
2001-01-05 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (volatile): Define to empty if not using ANSI C.
|
||||
|
||||
2001-03-05 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for OSF/1 5.1.
|
||||
|
||||
2001-03-01 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: For DOS/DJGPP, add CP775.
|
||||
|
||||
2001-02-24 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Add support for DOS/DJGPP.
|
||||
|
||||
2001-02-25 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Don't return NULL.
|
||||
|
||||
2001-02-24 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
|
||||
|
||||
2001-01-30 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for FreeBSD 4.2.
|
||||
|
||||
2000-12-19 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* localcharset.c: Improve WIN32 macrology.
|
||||
(locale_charset): Increase size of buffer.
|
||||
|
||||
2000-12-18 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Add support for BeOS.
|
||||
|
||||
2000-12-12 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (ref-add.sed, ref-del.sed): Don't use $<, not understood
|
||||
by Solaris "make". Reported by Toshimitsu Fujiwara.
|
||||
|
||||
2000-12-08 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.in (exec_prefix): Use configure's --exec-prefix argument.
|
||||
|
||||
2000-12-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc: Replace STATIC with its opposite flag, DLL.
|
||||
|
||||
2000-11-21 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc (MFLAGS): New variable.
|
||||
(CFLAGS, charset.lib): Use it.
|
||||
(INCLUDES): Use "..", not "..\include".
|
||||
|
||||
2000-10-31 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* Makefile.msvc: New file.
|
||||
|
||||
2000-10-31 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
|
||||
CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
|
||||
to the list of canonical encodings. Rename EUC-CN to GB2312.
|
||||
* localcharset.c (locale_charset): Add support for Win32.
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Support for relocatable installation.
|
||||
* relocatable.m4: New file, from GNU gettext.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* codeset.m4: Update from GNU gettext-0.10.40.
|
||||
* glibc21.m4: Update from GNU gettext-0.10.40.
|
||||
|
||||
2002-11-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* libtool.m4: Upgrade to libtool-1.4.3.
|
||||
|
||||
2002-07-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* libtool.m4 (_LT_AC_LTCONFIG_HACK): Add support for GNU/FreeBSD.
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
This directory contains tools for maintaining the config.charset file.
|
||||
|
||||
The main script is "all-charsets". Before using it, you must configure
|
||||
this package. For all installed locales, it prints
|
||||
- the result of the command "locale charmap",
|
||||
- the result of "nl_langinfo (CODESET)",
|
||||
- the result of "locale_charset ()".
|
||||
|
||||
It uses the following auxiliary scripts and programs:
|
||||
- all-locales
|
||||
Prints all usable locales in the system, one per line.
|
||||
- locale_charmap
|
||||
Executes "locale charmap".
|
||||
- locale_codeset.c
|
||||
Prints nl_langinfo (CODESET).
|
||||
- locale_charset.c
|
||||
Prints locale_charset().
|
||||
|
||||
A second main script is "all-charsets-X11". It also prints the X11
|
||||
encoding name. Before using it, you must tweak the X11 paths needed
|
||||
for compiling locale_x11encoding (a simple X11 program), and let your
|
||||
DISPLAY environment variable point to a running X11 screen.
|
||||
|
||||
The other files are test results from various operating systems.
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
2003-11-13 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* sr.po: New file, from Aleksandar Jelenak <jelenak@netlinkplus.net>.
|
||||
* LINGUAS: Add sr.
|
||||
|
||||
2003-10-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* pl.po: New file, from Arkadiusz Lipiec <A.Lipiec@elka.pw.edu.pl>.
|
||||
* LINGUAS: Add pl.
|
||||
|
||||
2003-08-22 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* wa.po: New file, from Pablo Saratxaga <pablo@walon.org>.
|
||||
* LINGUAS: Add wa.
|
||||
|
||||
2003-08-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* nl.po: Update from Elros Cyriatan <cyriatan@fastmail.fm>.
|
||||
|
||||
2003-07-31 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* nl.po: New file, from Taco Witte <T.C.Witte@phys.uu.nl>.
|
||||
* LINGUAS: Add nl.
|
||||
|
||||
2003-06-11 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* et.po: New file, from Toomas Soome <Toomas.Soome@microlink.ee>.
|
||||
* ro.po: Update from Eugen Hoanca <eugenh@urban-grafx.ro>.
|
||||
* ru.po: Update from Dmitry S. Sivachenko <mitya@cavia.pp.ru>.
|
||||
* zh_CN.po: New file, from Wang Jian <lark@linux.net.cn>.
|
||||
* LINGUAS: Add et and zh_CN.
|
||||
|
||||
2003-05-07 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* ga.po: Update from Kevin Patrick Scannell <scannell@slu.edu>.
|
||||
|
||||
2003-05-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* ga.po: New file, from Kevin Patrick Scannell <scannell@slu.edu>.
|
||||
* LINGUAS: Add it.
|
||||
|
||||
2003-04-22 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* ro.po: New file, from Eugen Hoanca <eugenh@urban-grafx.ro>.
|
||||
* LINGUAS: Add it.
|
||||
|
||||
2003-04-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makefile.msvc.sh (PREFIX): New variable.
|
||||
(prefix): Use it.
|
||||
(clean): Drop Unix specific removal.
|
||||
|
||||
2003-04-09 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* Makevars (MSGID_BUGS_ADDRESS): New variable.
|
||||
|
||||
2003-04-09 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.12-pre3.
|
||||
|
||||
2003-03-17 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Improved MSVC support.
|
||||
* Makefile.msvc.sh: New file.
|
||||
* Rules-msvc: New file.
|
||||
|
||||
2003-02-10 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* uk.po: New file, from Volodymyr M. Lisivka <lvm@mystery.lviv.net>.
|
||||
* LINGUAS: Add it.
|
||||
|
||||
2002-12-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* it.po: New file, from Marco Parrone <marc0@autistici.org>.
|
||||
* LINGUAS: Add it.
|
||||
|
||||
2002-11-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* da.po: New file, from Keld Simonsen <keld@dkuug.dk>.
|
||||
* LINGUAS: Add da.
|
||||
|
||||
2002-10-29 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* id.po: New file, from Tedi Heriyanto <tedi_h@gmx.net>.
|
||||
* LINGUAS: Add id.
|
||||
|
||||
2002-08-23 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* fi.po: New file, from Matti Koskimies <matti@apulanta.fi>.
|
||||
* fr.po: New file, from Michel Robitaille <robitail@iro.umontreal.ca>.
|
||||
* pt_BR.po: Update from
|
||||
Alexandre Folle de Menezes <afmenez@terra.com.br>.
|
||||
* ru.po: New file, from Dmitry S. Sivachenko <mitya@cavia.pp.ru>.
|
||||
* sl.po: New file, from
|
||||
Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>.
|
||||
* tr.po: New file, from Deniz Akkus Kanca <deniz@arayan.com>.
|
||||
* LINGUAS: Add fi, fr, ru, sl, tr.
|
||||
|
||||
2002-06-20 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* es.po: New file, from Santiago Vila Doncel <sanvila@unex.es>.
|
||||
* LINGUAS: Add es.
|
||||
|
||||
2002-06-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* hr.po: New file, from Denis Lackovic <delacko@fly.srk.fer.hr>.
|
||||
* LINGUAS: Add hr.
|
||||
|
||||
2002-06-14 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* pt_BR.po: Update from
|
||||
Alexandre Folle de Menezes <afmenez@terra.com.br>.
|
||||
|
||||
2002-06-11 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* sv.po: New file, from Christian Rose <menthos@menthos.com>.
|
||||
* LINGUAS: Add sv.
|
||||
|
||||
2002-06-05 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* pt_BR.po: New file, from
|
||||
Alexandre Folle de Menezes <afmenez@terra.com.br>.
|
||||
* LINGUAS: Add pt_BR.
|
||||
|
||||
2002-06-03 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* gl.po: New file, from Jacobo Tarrio <jtarrio@trasno.net>.
|
||||
* LINGUAS: Add gl.
|
||||
|
||||
2002-05-31 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* ca.po: New file, from Ivan Vilata i Balaguer <ivan@selidor.net>.
|
||||
* eo.po: New file, from Edmund Grimley Evans <edmundo@rano.org>.
|
||||
* hu.po: New file, from Emese Kovacs <emese@gnome.hu>.
|
||||
* sk.po: New file, from Marcel Telka <marcel@telka.sk>.
|
||||
* LINGUAS: Add ca, eo, hu, sk.
|
||||
|
||||
2002-04-27 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: New file, from gettext-0.11.1.
|
||||
* Rules-quot: New file, from gettext-0.11.1.
|
||||
* boldquot.sed: New file, from gettext-0.11.1.
|
||||
* en@boldquot.header: New file, from gettext-0.11.1.
|
||||
* en@quot.header: New file, from gettext-0.11.1.
|
||||
* insert-header.sin: New file, from gettext-0.11.1.
|
||||
* quot.sed: New file, from gettext-0.11.1.
|
||||
* remove-potcdate.sin: New file, from gettext-0.11.1.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# This file contains a table of character encoding aliases,
|
||||
# suitable for operating system 'mingw32'.
|
||||
# It was automatically generated from config.charset.
|
||||
# Packages using this file:
|
|
@ -0,0 +1,35 @@
|
|||
# libcharset.la - a libtool library file
|
||||
# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='../bin/libcharset1.dll'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libcharset.dll.a'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Version information for libcharset.
|
||||
current=1
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='C:/Users/marius/DOWNLO~1/WEBKIT~1/install/lib'
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче