mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
style changes: untabify
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, m4/flex.m4, * tests/glr-regression.at, tests/torture.at: here.
This commit is contained in:
@@ -279,20 +279,20 @@
|
|||||||
<xsl:with-param name="dst" select="@state"/>
|
<xsl:with-param name="dst" select="@state"/>
|
||||||
<xsl:with-param name="style">
|
<xsl:with-param name="style">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@symbol = 'error'">
|
<xsl:when test="@symbol = 'error'">
|
||||||
<xsl:text>dotted</xsl:text>
|
<xsl:text>dotted</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type = 'shift'">
|
<xsl:when test="@type = 'shift'">
|
||||||
<xsl:text>solid</xsl:text>
|
<xsl:text>solid</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>dashed</xsl:text>
|
<xsl:text>dashed</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
<xsl:with-param name="label">
|
<xsl:with-param name="label">
|
||||||
<xsl:if test="not(@symbol = 'error')">
|
<xsl:if test="not(@symbol = 'error')">
|
||||||
<xsl:value-of select="@symbol"/>
|
<xsl:value-of select="@symbol"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|||||||
@@ -253,9 +253,9 @@
|
|||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:apply-templates select="transition[@type = $type]">
|
<xsl:apply-templates select="transition[@type = $type]">
|
||||||
<xsl:with-param name="pad">
|
<xsl:with-param name="pad">
|
||||||
<xsl:call-template name="max-width-symbol">
|
<xsl:call-template name="max-width-symbol">
|
||||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
@@ -266,9 +266,9 @@
|
|||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:apply-templates select="error">
|
<xsl:apply-templates select="error">
|
||||||
<xsl:with-param name="pad">
|
<xsl:with-param name="pad">
|
||||||
<xsl:call-template name="max-width-symbol">
|
<xsl:call-template name="max-width-symbol">
|
||||||
<xsl:with-param name="node" select="error"/>
|
<xsl:with-param name="node" select="error"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
@@ -279,9 +279,9 @@
|
|||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:apply-templates select="reduction">
|
<xsl:apply-templates select="reduction">
|
||||||
<xsl:with-param name="pad">
|
<xsl:with-param name="pad">
|
||||||
<xsl:call-template name="max-width-symbol">
|
<xsl:call-template name="max-width-symbol">
|
||||||
<xsl:with-param name="node" select="reduction"/>
|
<xsl:with-param name="node" select="reduction"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
<xsl:template match="item">
|
<xsl:template match="item">
|
||||||
<xsl:param name="pad"/>
|
<xsl:param name="pad"/>
|
||||||
<xsl:param name="prev-rule-number"
|
<xsl:param name="prev-rule-number"
|
||||||
select="preceding-sibling::item[1]/@rule-number"/>
|
select="preceding-sibling::item[1]/@rule-number"/>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||||
>
|
>
|
||||||
@@ -329,14 +329,14 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
||||||
<xsl:call-template name="lpad">
|
<xsl:call-template name="lpad">
|
||||||
<xsl:with-param name="str" select="'|'"/>
|
<xsl:with-param name="str" select="'|'"/>
|
||||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
||||||
<xsl:call-template name="lpad">
|
<xsl:call-template name="lpad">
|
||||||
<xsl:with-param name="str" select="'|'"/>
|
<xsl:with-param name="str" select="'|'"/>
|
||||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -442,7 +442,7 @@
|
|||||||
<xsl:value-of select="@rule"/>
|
<xsl:value-of select="@rule"/>
|
||||||
<xsl:text> (</xsl:text>
|
<xsl:text> (</xsl:text>
|
||||||
<xsl:value-of
|
<xsl:value-of
|
||||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||||
<xsl:text>)</xsl:text>
|
<xsl:text>)</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
@@ -479,9 +479,9 @@
|
|||||||
<xsl:variable name="longest">
|
<xsl:variable name="longest">
|
||||||
<xsl:for-each select="$node">
|
<xsl:for-each select="$node">
|
||||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||||
order="descending"/>
|
order="descending"/>
|
||||||
<xsl:if test="position() = 1">
|
<xsl:if test="position() = 1">
|
||||||
<xsl:value-of select="string-length(@symbol)"/>
|
<xsl:value-of select="string-length(@symbol)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:call-template name="space">
|
<xsl:call-template name="space">
|
||||||
<xsl:with-param name="repeat" select="$diff"/>
|
<xsl:with-param name="repeat" select="$diff"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:value-of select="$str"/>
|
<xsl:value-of select="$str"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
@@ -516,7 +516,7 @@
|
|||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$str"/>
|
<xsl:value-of select="$str"/>
|
||||||
<xsl:call-template name="space">
|
<xsl:call-template name="space">
|
||||||
<xsl:with-param name="repeat" select="$diff"/>
|
<xsl:with-param name="repeat" select="$diff"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if test -z "${LEXLIB+set}"; then
|
|||||||
for ac_lib in '' -lfl -ll; do
|
for ac_lib in '' -lfl -ll; do
|
||||||
LIBS="$ac_lib $ac_save_LIBS"
|
LIBS="$ac_lib $ac_save_LIBS"
|
||||||
AC_LINK_IFELSE([AC_LANG_DEFINES_PROVIDED[`cat $LEX_OUTPUT_ROOT.c`]],
|
AC_LINK_IFELSE([AC_LANG_DEFINES_PROVIDED[`cat $LEX_OUTPUT_ROOT.c`]],
|
||||||
[ac_cv_lib_lex=$ac_lib])
|
[ac_cv_lib_lex=$ac_lib])
|
||||||
test "$ac_cv_lib_lex" != 'none needed' && break
|
test "$ac_cv_lib_lex" != 'none needed' && break
|
||||||
done
|
done
|
||||||
LIBS=$ac_save_LIBS
|
LIBS=$ac_save_LIBS
|
||||||
@@ -104,8 +104,8 @@ LIBS=$ac_save_LIBS
|
|||||||
dnl
|
dnl
|
||||||
if test $ac_cv_prog_lex_yytext_pointer = yes; then
|
if test $ac_cv_prog_lex_yytext_pointer = yes; then
|
||||||
AC_DEFINE([YYTEXT_POINTER], [1],
|
AC_DEFINE([YYTEXT_POINTER], [1],
|
||||||
[Define to 1 if `lex' declares `yytext' as a `char *' by default,
|
[Define to 1 if `lex' declares `yytext' as a `char *' by default,
|
||||||
not a `char[]'.])
|
not a `char[]'.])
|
||||||
fi
|
fi
|
||||||
rm -f conftest.l $LEX_OUTPUT_ROOT.c
|
rm -f conftest.l $LEX_OUTPUT_ROOT.c
|
||||||
])# _AC_PROG_LEX_YYTEXT_DECL
|
])# _AC_PROG_LEX_YYTEXT_DECL
|
||||||
|
|||||||
@@ -651,7 +651,7 @@ AT_CLEANUP
|
|||||||
|
|
||||||
## ------------------------------------------------------------------------- ##
|
## ------------------------------------------------------------------------- ##
|
||||||
## Incorrect default location for empty right-hand sides. Adapted from bug ##
|
## Incorrect default location for empty right-hand sides. Adapted from bug ##
|
||||||
## report by Claudia Hermann. ##
|
## report by Claudia Hermann. ##
|
||||||
## See http://lists.gnu.org/archive/html/bug-bison/2005-10/msg00069.html and ##
|
## See http://lists.gnu.org/archive/html/bug-bison/2005-10/msg00069.html and ##
|
||||||
## http://lists.gnu.org/archive/html/bug-bison/2005-10/msg00072.html ##
|
## http://lists.gnu.org/archive/html/bug-bison/2005-10/msg00072.html ##
|
||||||
## ------------------------------------------------------------------------- ##
|
## ------------------------------------------------------------------------- ##
|
||||||
@@ -677,25 +677,25 @@ AT_DATA_GRAMMAR([glr-regr8.y],
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
|
|
||||||
PortClause : T_PORT InterfaceDeclaration T_PORT
|
PortClause : T_PORT InterfaceDeclaration T_PORT
|
||||||
{ printf("%d/%d - %d/%d - %d/%d\n",
|
{ printf("%d/%d - %d/%d - %d/%d\n",
|
||||||
@1.first_column, @1.last_column,
|
@1.first_column, @1.last_column,
|
||||||
@2.first_column, @2.last_column,
|
@2.first_column, @2.last_column,
|
||||||
@3.first_column, @3.last_column); }
|
@3.first_column, @3.last_column); }
|
||||||
;
|
;
|
||||||
|
|
||||||
InterfaceDeclaration : OptConstantWord %dprec 1
|
InterfaceDeclaration : OptConstantWord %dprec 1
|
||||||
| OptSignalWord %dprec 2
|
| OptSignalWord %dprec 2
|
||||||
;
|
;
|
||||||
|
|
||||||
OptConstantWord : /* empty */
|
OptConstantWord : /* empty */
|
||||||
| T_CONSTANT
|
| T_CONSTANT
|
||||||
;
|
;
|
||||||
|
|
||||||
OptSignalWord : /* empty */
|
OptSignalWord : /* empty */
|
||||||
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
||||||
| T_SIGNAL
|
| T_SIGNAL
|
||||||
;
|
;
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
@@ -1058,7 +1058,7 @@ AT_CLEANUP
|
|||||||
|
|
||||||
|
|
||||||
## ------------------------------------------------------------------------- ##
|
## ------------------------------------------------------------------------- ##
|
||||||
## Incorrect lookahead during deterministic GLR. See ##
|
## Incorrect lookahead during deterministic GLR. See ##
|
||||||
## <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00017.html> and ##
|
## <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00017.html> and ##
|
||||||
## <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00060.html>. ##
|
## <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00060.html>. ##
|
||||||
## ------------------------------------------------------------------------- ##
|
## ------------------------------------------------------------------------- ##
|
||||||
@@ -1146,10 +1146,10 @@ print_lookahead (char const *reduction)
|
|||||||
{
|
{
|
||||||
printf ("'%c', yylval='", yychar);
|
printf ("'%c', yylval='", yychar);
|
||||||
if (yylval.value > ' ')
|
if (yylval.value > ' ')
|
||||||
printf ("%c", yylval.value);
|
printf ("%c", yylval.value);
|
||||||
printf ("', yylloc=(%d,%d),(%d,%d)",
|
printf ("', yylloc=(%d,%d),(%d,%d)",
|
||||||
yylloc.first_line, yylloc.first_column,
|
yylloc.first_line, yylloc.first_column,
|
||||||
yylloc.last_line, yylloc.last_column);
|
yylloc.last_line, yylloc.last_column);
|
||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
@@ -1246,7 +1246,7 @@ merge:
|
|||||||
| conflict defstate_look 'a' nonconflict2 'b' defstate_shift %dprec 2 {
|
| conflict defstate_look 'a' nonconflict2 'b' defstate_shift %dprec 2 {
|
||||||
USE ($3); USE ($5);
|
USE ($3); USE ($5);
|
||||||
print_lookahead ("merge <- conflict defstate_look 'a' nonconflict2 'b'"
|
print_lookahead ("merge <- conflict defstate_look 'a' nonconflict2 'b'"
|
||||||
" defstate_shift");
|
" defstate_shift");
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -1293,7 +1293,7 @@ alt1:
|
|||||||
USE ($1);
|
USE ($1);
|
||||||
if (yychar != 'd' && yychar != YYEOF)
|
if (yychar != 'd' && yychar != YYEOF)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -1302,7 +1302,7 @@ alt2:
|
|||||||
USE ($1);
|
USE ($1);
|
||||||
if (yychar != 'd' && yychar != YYEOF)
|
if (yychar != 'd' && yychar != YYEOF)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -1311,7 +1311,7 @@ alt3:
|
|||||||
USE ($1);
|
USE ($1);
|
||||||
if (yychar != 'd' && yychar != YYEOF)
|
if (yychar != 'd' && yychar != YYEOF)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
fprintf (stderr, "Incorrect lookahead during stack explosion.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -1319,8 +1319,8 @@ no_look:
|
|||||||
{
|
{
|
||||||
if (yychar != YYEMPTY)
|
if (yychar != YYEMPTY)
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Found lookahead where shouldn't during stack explosion.\n");
|
"Found lookahead where shouldn't during stack explosion.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -1352,10 +1352,10 @@ print_lookahead (char const *reduction)
|
|||||||
{
|
{
|
||||||
printf ("'%c', yylval='", yychar);
|
printf ("'%c', yylval='", yychar);
|
||||||
if (yylval.value > ' ')
|
if (yylval.value > ' ')
|
||||||
printf ("%c", yylval.value);
|
printf ("%c", yylval.value);
|
||||||
printf ("', yylloc=(%d,%d),(%d,%d)",
|
printf ("', yylloc=(%d,%d),(%d,%d)",
|
||||||
yylloc.first_line, yylloc.first_column,
|
yylloc.first_line, yylloc.first_column,
|
||||||
yylloc.last_line, yylloc.last_column);
|
yylloc.last_line, yylloc.last_column);
|
||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ for my $size (1 .. $max)
|
|||||||
{
|
{
|
||||||
use Text::Wrap;
|
use Text::Wrap;
|
||||||
print wrap ("| ", " ",
|
print wrap ("| ", " ",
|
||||||
(map { "\"$_\"" } (1 .. $size)),
|
(map { "\"$_\"" } (1 .. $size)),
|
||||||
" END \n"),
|
" END \n"),
|
||||||
" { \$\$ = $size; }\n";
|
" { \$\$ = $size; }\n";
|
||||||
};
|
};
|
||||||
print ";\n";
|
print ";\n";
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ EOF
|
|||||||
use Text::Wrap;
|
use Text::Wrap;
|
||||||
print
|
print
|
||||||
wrap ("exp: ", " ",
|
wrap ("exp: ", " ",
|
||||||
(map { "\"$_\"" } (1 .. $max)), ";"),
|
(map { "\"$_\"" } (1 .. $max)), ";"),
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
print <<\EOF;
|
print <<\EOF;
|
||||||
@@ -288,8 +288,8 @@ EOF
|
|||||||
|
|
||||||
print
|
print
|
||||||
wrap ("%type <val> ",
|
wrap ("%type <val> ",
|
||||||
" ",
|
" ",
|
||||||
map { "n$_" } (1 .. $max)),
|
map { "n$_" } (1 .. $max)),
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
print "%token\n";
|
print "%token\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user