mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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="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: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:value-of select="@symbol"/>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
|
||||
@@ -253,9 +253,9 @@
|
||||
<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: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>
|
||||
@@ -266,9 +266,9 @@
|
||||
<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:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -279,9 +279,9 @@
|
||||
<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:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -290,7 +290,7 @@
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates
|
||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||
>
|
||||
@@ -329,14 +329,14 @@
|
||||
<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: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:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -442,7 +442,7 @@
|
||||
<xsl:value-of select="@rule"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -479,9 +479,9 @@
|
||||
<xsl:variable name="longest">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||
order="descending"/>
|
||||
order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
@@ -498,7 +498,7 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
@@ -516,7 +516,7 @@
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
@@ -78,7 +78,7 @@ if test -z "${LEXLIB+set}"; then
|
||||
for ac_lib in '' -lfl -ll; do
|
||||
LIBS="$ac_lib $ac_save_LIBS"
|
||||
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
|
||||
done
|
||||
LIBS=$ac_save_LIBS
|
||||
@@ -104,8 +104,8 @@ LIBS=$ac_save_LIBS
|
||||
dnl
|
||||
if test $ac_cv_prog_lex_yytext_pointer = yes; then
|
||||
AC_DEFINE([YYTEXT_POINTER], [1],
|
||||
[Define to 1 if `lex' declares `yytext' as a `char *' by default,
|
||||
not a `char[]'.])
|
||||
[Define to 1 if `lex' declares `yytext' as a `char *' by default,
|
||||
not a `char[]'.])
|
||||
fi
|
||||
rm -f conftest.l $LEX_OUTPUT_ROOT.c
|
||||
])# _AC_PROG_LEX_YYTEXT_DECL
|
||||
|
||||
@@ -651,7 +651,7 @@ AT_CLEANUP
|
||||
|
||||
## ------------------------------------------------------------------------- ##
|
||||
## 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 ##
|
||||
## 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
|
||||
{ printf("%d/%d - %d/%d - %d/%d\n",
|
||||
@1.first_column, @1.last_column,
|
||||
@2.first_column, @2.last_column,
|
||||
@3.first_column, @3.last_column); }
|
||||
;
|
||||
PortClause : T_PORT InterfaceDeclaration T_PORT
|
||||
{ printf("%d/%d - %d/%d - %d/%d\n",
|
||||
@1.first_column, @1.last_column,
|
||||
@2.first_column, @2.last_column,
|
||||
@3.first_column, @3.last_column); }
|
||||
;
|
||||
|
||||
InterfaceDeclaration : OptConstantWord %dprec 1
|
||||
| OptSignalWord %dprec 2
|
||||
;
|
||||
InterfaceDeclaration : OptConstantWord %dprec 1
|
||||
| OptSignalWord %dprec 2
|
||||
;
|
||||
|
||||
OptConstantWord : /* empty */
|
||||
| T_CONSTANT
|
||||
;
|
||||
OptConstantWord : /* empty */
|
||||
| T_CONSTANT
|
||||
;
|
||||
|
||||
OptSignalWord : /* empty */
|
||||
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
||||
| T_SIGNAL
|
||||
;
|
||||
OptSignalWord : /* empty */
|
||||
{ printf("empty: %d/%d\n", @$.first_column, @$.last_column); }
|
||||
| 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/bison-patches/2006-01/msg00060.html>. ##
|
||||
## ------------------------------------------------------------------------- ##
|
||||
@@ -1146,10 +1146,10 @@ print_lookahead (char const *reduction)
|
||||
{
|
||||
printf ("'%c', yylval='", yychar);
|
||||
if (yylval.value > ' ')
|
||||
printf ("%c", yylval.value);
|
||||
printf ("%c", yylval.value);
|
||||
printf ("', yylloc=(%d,%d),(%d,%d)",
|
||||
yylloc.first_line, yylloc.first_column,
|
||||
yylloc.last_line, yylloc.last_column);
|
||||
yylloc.first_line, yylloc.first_column,
|
||||
yylloc.last_line, yylloc.last_column);
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
@@ -1246,7 +1246,7 @@ merge:
|
||||
| conflict defstate_look 'a' nonconflict2 'b' defstate_shift %dprec 2 {
|
||||
USE ($3); USE ($5);
|
||||
print_lookahead ("merge <- conflict defstate_look 'a' nonconflict2 'b'"
|
||||
" defstate_shift");
|
||||
" defstate_shift");
|
||||
}
|
||||
;
|
||||
|
||||
@@ -1293,7 +1293,7 @@ alt1:
|
||||
USE ($1);
|
||||
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);
|
||||
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);
|
||||
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)
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Found lookahead where shouldn't during stack explosion.\n");
|
||||
fprintf (stderr,
|
||||
"Found lookahead where shouldn't during stack explosion.\n");
|
||||
}
|
||||
}
|
||||
;
|
||||
@@ -1352,10 +1352,10 @@ print_lookahead (char const *reduction)
|
||||
{
|
||||
printf ("'%c', yylval='", yychar);
|
||||
if (yylval.value > ' ')
|
||||
printf ("%c", yylval.value);
|
||||
printf ("%c", yylval.value);
|
||||
printf ("', yylloc=(%d,%d),(%d,%d)",
|
||||
yylloc.first_line, yylloc.first_column,
|
||||
yylloc.last_line, yylloc.last_column);
|
||||
yylloc.first_line, yylloc.first_column,
|
||||
yylloc.last_line, yylloc.last_column);
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ for my $size (1 .. $max)
|
||||
{
|
||||
use Text::Wrap;
|
||||
print wrap ("| ", " ",
|
||||
(map { "\"$_\"" } (1 .. $size)),
|
||||
" END \n"),
|
||||
" { \$\$ = $size; }\n";
|
||||
(map { "\"$_\"" } (1 .. $size)),
|
||||
" END \n"),
|
||||
" { \$\$ = $size; }\n";
|
||||
};
|
||||
print ";\n";
|
||||
|
||||
@@ -188,7 +188,7 @@ EOF
|
||||
use Text::Wrap;
|
||||
print
|
||||
wrap ("exp: ", " ",
|
||||
(map { "\"$_\"" } (1 .. $max)), ";"),
|
||||
(map { "\"$_\"" } (1 .. $max)), ";"),
|
||||
"\n";
|
||||
|
||||
print <<\EOF;
|
||||
@@ -288,8 +288,8 @@ EOF
|
||||
|
||||
print
|
||||
wrap ("%type <val> ",
|
||||
" ",
|
||||
map { "n$_" } (1 .. $max)),
|
||||
" ",
|
||||
map { "n$_" } (1 .. $max)),
|
||||
"\n";
|
||||
|
||||
print "%token\n";
|
||||
|
||||
Reference in New Issue
Block a user