Updated bison to 2.6.2, so far only works with gcc4, see #628.

This commit is contained in:
Scott McCreary
2012-10-01 05:18:13 +00:00
parent 339562338d
commit 6030bac0ce
2 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
DESCRIPTION="bison - A yacc-compatible parser generator"
HOMEPAGE="http://www.gnu.org/software/bison/bison.html"
SRC_URI="http://ftp.gnu.org/gnu/bison/bison-2.6.2.tar.gz"
CHECKSUM_MD5="8b8e458d4ce0cc184f1a58af93663647"
REVISION="15"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd bison-2.6.2
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datadir=`finddir B_COMMON_DATA_DIRECTORY` \
--infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
--disable-nls
make
}
INSTALL {
cd bison-2.6.2
make install
}
TEST {
cd bison-2.6.2
make check
}
LICENSE="GNU GPL v3"
COPYRIGHT="1992-2011 Free Software Foundation, Inc."

View File

@@ -0,0 +1,81 @@
diff -urN bison-2.6.2/src/AnnotationList.c bison-2.6.2-haiku/src/AnnotationList.c
--- bison-2.6.2/src/AnnotationList.c 2012-03-30 05:39:19.030146560 -0700
+++ bison-2.6.2-haiku/src/AnnotationList.c 2012-09-30 11:25:40.750518272 -0700
@@ -230,12 +230,13 @@
state **predecessor;
for (predecessor = predecessors[s->number]; *predecessor; ++predecessor)
{
+ bool potential_contribution = false;
+ bitset *lookaheads = NULL;
AnnotationList *annotation_node =
AnnotationList__alloc_on_obstack (
self->inadequacyNode->contributionCount, annotations_obstackp);
annotation_node->inadequacyNode = self->inadequacyNode;
- bool potential_contribution = false;
- bitset *lookaheads = NULL;
+
{
ContributionIndex ci;
for (ci = 0; ci < self->inadequacyNode->contributionCount; ++ci)
diff -urN bison-2.6.2/src/ielr.c bison-2.6.2-haiku/src/ielr.c
--- bison-2.6.2/src/ielr.c 2012-03-30 05:39:19.032243712 -0700
+++ bison-2.6.2-haiku/src/ielr.c 2012-09-30 11:28:10.713555968 -0700
@@ -1032,9 +1032,9 @@
lookahead sets. */
if (!annotation_lists)
{
+ state_list *node;
timevar_push (TV_IELR_PHASE4);
initialize_LA ();
- state_list *node;
for (node = first_state; node; node = node->next)
if (!node->state->consistent)
{
diff -urN bison-2.6.2/src/location.c bison-2.6.2-haiku/src/location.c
--- bison-2.6.2/src/location.c 2012-03-30 05:39:19.033030144 -0700
+++ bison-2.6.2-haiku/src/location.c 2012-09-30 10:32:52.147587072 -0700
@@ -144,11 +144,11 @@
/* Must search in reverse since the file name field may
* contain `.' or `:'. */
char *delim = mbsrchr (loc_str, '.');
- aver (delim);
+ aver (delim != NULL);
*delim = '\0';
bound->column = atoi (delim+1);
delim = mbsrchr (loc_str, ':');
- aver (delim);
+ aver (delim != NULL);
*delim = '\0';
bound->line = atoi (delim+1);
bound->file = uniqstr_new (loc_str);
diff -urN bison-2.6.2/src/muscle-tab.c bison-2.6.2-haiku/src/muscle-tab.c
--- bison-2.6.2/src/muscle-tab.c 2012-07-30 09:06:21.033816576 -0700
+++ bison-2.6.2-haiku/src/muscle-tab.c 2012-09-30 10:32:52.255852544 -0700
@@ -344,7 +344,7 @@
{
location loc;
char const *value = muscle_find_const (key);
- aver (value);
+ aver (value != NULL);
aver (*value == '[');
aver (*++value == '[');
while (*++value)
diff -urN bison-2.6.2/src/scan-code.l bison-2.6.2-haiku/src/scan-code.l
--- bison-2.6.2/src/scan-code.l 2012-07-30 09:06:21.009437184 -0700
+++ bison-2.6.2-haiku/src/scan-code.l2 2012-09-30 19:52:46.294912000 -0700
@@ -611,12 +611,12 @@
indent += SUB_INDENT;
if (len == 0)
{
- location sym_loc = text_loc;
- sym_loc.start.column += 1;
- sym_loc.end = sym_loc.start;
const char *format =
_("syntax error after '%c', expecting integer, letter,"
" '_', '[', or '$'");
+ location sym_loc = text_loc;
+ sym_loc.start.column += 1;
+ sym_loc.end = sym_loc.start;
complain_at_indent (sym_loc, &indent, format, dollar_or_at);
}
else if (midrule_rhs_index)