X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/1f916a78e6af829d8c2a8ec982f45aa7a30a9af5..ee42c6166b14ae855c6c1ffc100d5aead31175e2:/src/parse-gram.y diff --git a/src/parse-gram.y b/src/parse-gram.y index e7718945..0f81bf18 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -1,4 +1,4 @@ -/* Bison Grammar Parser -*- C -*- +%{/* Bison Grammar Parser -*- C -*- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. @@ -20,16 +20,6 @@ 02111-1307 USA */ - -%debug -%defines -%locations -%pure-parser -%error-verbose -%defines -%name-prefix="gram_" - -%{ #include "system.h" #include "complain.h" @@ -66,6 +56,14 @@ assoc current_assoc; int current_prec = 0; %} +%debug +%defines +%locations +%pure-parser +%error-verbose +%defines +%name-prefix="gram_" + %initial-action { /* Bison's grammar can initial empty locations, hence a default @@ -445,7 +443,11 @@ lloc_default (YYLTYPE const *rhs, int n) { int i; YYLTYPE loc; - loc.start = loc.end = rhs[n].end; + + /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;". + The bug is fixed in 7.4.2m, but play it safe for now. */ + loc.start = rhs[n].end; + loc.end = rhs[n].end; /* Ignore empty nonterminals the start of the the right-hand side. Do not bother to ignore them at the end of the right-hand side,