* data/glr.c: Reformat whitespace with tabs.

(b4_lpure_formals): Remove this unused m4 macro.
* tests/cxx-type.at: Reformat whitespace with tabs.
(_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
since it's a member.  Rename type to isNterm for clarity.
This commit is contained in:
Akim Demaille
2006-01-02 15:28:03 +00:00
parent c4d497a010
commit 9ecafbbfe7
3 changed files with 80 additions and 79 deletions
+8
View File
@@ -1,3 +1,11 @@
2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
* data/glr.c: Reformat whitespace with tabs.
(b4_lpure_formals): Remove this unused m4 macro.
* tests/cxx-type.at: Reformat whitespace with tabs.
(_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
since it's a member. Rename type to isNterm for clarity.
2005-12-29 Akim <akim@sulaco.local> 2005-12-29 Akim <akim@sulaco.local>
Let glr.cc catch up with symbol_value_print. Let glr.cc catch up with symbol_value_print.
+29 -36
View File
@@ -92,13 +92,6 @@ m4_define([b4_pure_formals],
[b4_pure_if([b4_location_if([, YYLTYPE *yylocp])])[]b4_user_formals]) [b4_pure_if([b4_location_if([, YYLTYPE *yylocp])])[]b4_user_formals])
# b4_lpure_formals
# ----------------
# Same as above, but on the look-ahead, hence yyllocp instead of yylocp.
m4_define([b4_lpure_formals],
[b4_pure_if([b4_location_if([YYLTYPE *yyllocp])])[]b4_user_formals])
## ----------------- ## ## ----------------- ##
## Semantic Values. ## ## Semantic Values. ##
## ----------------- ## ## ----------------- ##
@@ -495,7 +488,7 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
#ifndef YYLLOC_DEFAULT #ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \ # define YYLLOC_DEFAULT(Current, Rhs, N) \
do \ do \
if (YYID (N)) \ if (YYID (N)) \
{ \ { \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -584,8 +577,8 @@ do { \
if (yydebug) \ if (yydebug) \
{ \ { \
YYFPRINTF (stderr, "%s ", Title); \ YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \ yy_symbol_print (stderr, Type, \
Type, Value]b4_location_if([, Location])[]b4_user_args[); \ Value]b4_location_if([, Location])[]b4_user_args[); \
YYFPRINTF (stderr, "\n"); \ YYFPRINTF (stderr, "\n"); \
} \ } \
} while (YYID (0)) } while (YYID (0))
@@ -977,7 +970,7 @@ yydestroyGLRState (char const *yymsg, yyGLRState *yys]b4_user_formals[)
{ {
YYFPRINTF (stderr, "%s unresolved ", yymsg); YYFPRINTF (stderr, "%s unresolved ", yymsg);
yy_symbol_print (stderr, yystos[yys->yylrState], yy_symbol_print (stderr, yystos[yys->yylrState],
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[]b4_user_args[); &yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[]b4_user_args[);
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
#endif #endif
@@ -1851,7 +1844,7 @@ yycompressStack (yyGLRStack* yystackp)
static YYRESULTTAG static YYRESULTTAG
yyprocessOneStack (yyGLRStack* yystackp, size_t yyk, yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
size_t yyposn]b4_pure_formals[) size_t yyposn]b4_pure_formals[)
{ {
int yyaction; int yyaction;
const short int* yyconflicts; const short int* yyconflicts;
@@ -1885,7 +1878,7 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX; yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar); *yytokenp = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", *yytokenp, &yylval, &yylloc); YY_SYMBOL_PRINT ("Next token is", *yytokenp, &yylval, &yylloc);
} }
yygetLRActions (yystate, *yytokenp, &yyaction, &yyconflicts); yygetLRActions (yystate, *yytokenp, &yyaction, &yyconflicts);
@@ -1897,8 +1890,8 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
(unsigned long int) yyk)); (unsigned long int) yyk));
YYCHK (yyglrReduce (yystackp, yynewStack, YYCHK (yyglrReduce (yystackp, yynewStack,
*yyconflicts, yyfalse]b4_user_args[)); *yyconflicts, yyfalse]b4_user_args[));
YYCHK (yyprocessOneStack (yystackp, yynewStack, YYCHK (yyprocessOneStack (yystackp, yynewStack,
yyposn]b4_pure_args[)); yyposn]b4_pure_args[));
yyconflicts += 1; yyconflicts += 1;
} }
@@ -1912,8 +1905,8 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
break; break;
} }
else else
YYCHK (yyglrReduce (yystackp, yyk, -yyaction, YYCHK (yyglrReduce (yystackp, yyk, -yyaction,
yyfalse]b4_user_args[)); yyfalse]b4_user_args[));
} }
} }
return yyok; return yyok;
@@ -2044,15 +2037,15 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
yyGLRState *yys = yystackp->yytops.yystates[0]; yyGLRState *yys = yystackp->yytops.yystates[0];
yyGLRStackItem yyerror_range[3]; yyGLRStackItem yyerror_range[3];
yyerror_range[1].yystate.yyloc = yys->yyloc; yyerror_range[1].yystate.yyloc = yys->yyloc;
yyerror_range[2].yystate.yyloc = yylloc; yyerror_range[2].yystate.yyloc = yylloc;
YYLLOC_DEFAULT (yys->yyloc, yyerror_range, 2);]])[ YYLLOC_DEFAULT (yys->yyloc, yyerror_range, 2);]])[
yydestruct ("Error: discarding", yydestruct ("Error: discarding",
*yytokenp, &yylval]b4_location_if([, &yylloc])[]b4_user_args[); *yytokenp, &yylval]b4_location_if([, &yylloc])[]b4_user_args[);
} }
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX; yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar); *yytokenp = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", *yytokenp, &yylval, &yylloc); YY_SYMBOL_PRINT ("Next token is", *yytokenp, &yylval, &yylloc);
yyj = yypact[yystackp->yytops.yystates[0]->yylrState]; yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
if (yyis_pact_ninf (yyj)) if (yyis_pact_ninf (yyj))
return; return;
@@ -2091,12 +2084,12 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
{ {
/* Shift the error token having adjusted its location. */ /* Shift the error token having adjusted its location. */
YYLTYPE yyerrloc;]b4_location_if([[ YYLTYPE yyerrloc;]b4_location_if([[
yystackp->yyerror_range[2].yystate.yyloc = yylloc; yystackp->yyerror_range[2].yystate.yyloc = yylloc;
YYLLOC_DEFAULT (yyerrloc, yystackp->yyerror_range, 2);]])[ YYLLOC_DEFAULT (yyerrloc, yystackp->yyerror_range, 2);]])[
YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]], YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
&yylval, &yyerrloc); &yylval, &yyerrloc);
yyglrShift (yystackp, 0, yytable[yyj], yyglrShift (yystackp, 0, yytable[yyj],
yys->yyposn, &yylval, &yyerrloc); yys->yyposn, &yylval, &yyerrloc);
yys = yystackp->yytops.yystates[0]; yys = yystackp->yytops.yystates[0];
break; break;
} }
@@ -2194,8 +2187,8 @@ b4_syncline([@oline@], [@ofile@])])dnl
yyrule = yydefaultAction (yystate); yyrule = yydefaultAction (yystate);
if (yyrule == 0) if (yyrule == 0)
{ {
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ ]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[); yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error; goto yyuser_error;
} }
YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_user_args[)); YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_user_args[));
@@ -2207,25 +2200,25 @@ b4_syncline([@oline@], [@ofile@])])dnl
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX; yychar = YYLEX;
yytoken = YYTRANSLATE (yychar); yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
} }
yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts); yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
if (*yyconflicts != 0) if (*yyconflicts != 0)
break; break;
if (yyisShiftAction (yyaction)) if (yyisShiftAction (yyaction))
{ {
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
if (yytoken != YYEOF) if (yytoken != YYEOF)
yytoken = YYEMPTY; yytoken = YYEMPTY;
yyposn += 1; yyposn += 1;
yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc); yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc);
if (0 < yystack.yyerrState) if (0 < yystack.yyerrState)
yystack.yyerrState -= 1; yystack.yyerrState -= 1;
} }
else if (yyisErrorAction (yyaction)) else if (yyisErrorAction (yyaction))
{ {
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ ]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[); yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error; goto yyuser_error;
} }
else else
@@ -2259,7 +2252,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
on yylval in the event of memory exhaustion. */ on yylval in the event of memory exhaustion. */
for (yys = 0; yys < yyn; yys += 1) for (yys = 0; yys < yyn; yys += 1)
YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn]b4_lpure_args[)); YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn]b4_lpure_args[));
yyremoveDeletes (&yystack); yyremoveDeletes (&yystack);
yyn = yystack.yytops.yysize; yyn = yystack.yytops.yysize;
@@ -2280,9 +2273,9 @@ b4_syncline([@oline@], [@ofile@])])dnl
&yyconflicts); &yyconflicts);
/* Note that yyconflicts were handled by yyprocessOneStack. */ /* Note that yyconflicts were handled by yyprocessOneStack. */
YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys)); YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys));
YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc); YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
yyglrShift (&yystack, yys, yyaction, yyposn, yyglrShift (&yystack, yys, yyaction, yyposn,
&yylval, &yylloc); &yylval, &yylloc);
YYDPRINTF ((stderr, "Stack %lu now in state #%d\n", YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
(unsigned long int) yys, (unsigned long int) yys,
yystack.yytops.yystates[yys]->yylrState)); yystack.yytops.yystates[yys]->yylrState));
@@ -2294,8 +2287,8 @@ b4_syncline([@oline@], [@ofile@])])dnl
yyFail (&yystack][]b4_lpure_args[, YY_("syntax error")); yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
YYCHK1 (yyresolveStack (&yystack]b4_user_args[)); YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
YYDPRINTF ((stderr, "Returning to deterministic operation.\n")); YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[ ]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[); yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error; goto yyuser_error;
} }
else if (yystack.yytops.yysize == 1) else if (yystack.yytops.yysize == 1)
@@ -2332,7 +2325,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
yyreturn: yyreturn:
if (yytoken != YYEOF && yytoken != YYEMPTY) if (yytoken != YYEOF && yytoken != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval]b4_location_if([, &yylloc])[]b4_user_args[); yytoken, &yylval]b4_location_if([, &yylloc])[]b4_user_args[);
/* If the stack is well-formed, pop the stack until it is empty, /* If the stack is well-formed, pop the stack until it is empty,
destroying its entries as we go. But free the stack regardless destroying its entries as we go. But free the stack regardless
+43 -43
View File
@@ -36,17 +36,17 @@ $1
#include <stdio.h> #include <stdio.h>
union Node { union Node {
struct { struct {
int type; int isNterm;
int parents; int parents;
} node_info; } nodeInfo;
struct { struct {
int type; /* 1 */ int isNterm; /* 1 */
int parents; int parents;
char const *form; char const *form;
union Node *children[3]; union Node *children[3];
} nterm; } nterm;
struct { struct {
int type; /* 0 */ int isNterm; /* 0 */
int parents; int parents;
char *text; char *text;
} term; } term;
@@ -93,35 +93,35 @@ $1
prog : prog :
| prog stmt { | prog stmt {
char *output;]AT_LOCATION_IF([ char *output;]AT_LOCATION_IF([
printf ("%d.%d-%d.%d: ", printf ("%d.%d-%d.%d: ",
@2.first_line, @2.first_column, @2.first_line, @2.first_column,
@2.last_line, @2.last_column);])[ @2.last_line, @2.last_column);])[
output = node_to_string (]$[2); output = node_to_string (]$[2);
printf ("%s\n", output); printf ("%s\n", output);
free (output); free (output);
free_node (]$[2); free_node (]$[2);
} }
; ;
stmt : expr ';' $2 { $$ = ]$[1; } stmt : expr ';' $2 { $$ = ]$[1; }
| decl $3 | decl $3
| error ';' { $$ = new_nterm ("<error>", 0, 0, 0); } | error ';' { $$ = new_nterm ("<error>", 0, 0, 0); }
| '@' { YYACCEPT; } | '@' { YYACCEPT; }
; ;
expr : ID expr : ID
| TYPENAME '(' expr ')' | TYPENAME '(' expr ')'
{ $$ = new_nterm ("<cast>(%s,%s)", ]$[3, ]$[1, 0); } { $$ = new_nterm ("<cast>(%s,%s)", ]$[3, ]$[1, 0); }
| expr '+' expr { $$ = new_nterm ("+(%s,%s)", ]$[1, ]$[3, 0); } | expr '+' expr { $$ = new_nterm ("+(%s,%s)", ]$[1, ]$[3, 0); }
| expr '=' expr { $$ = new_nterm ("=(%s,%s)", ]$[1, ]$[3, 0); } | expr '=' expr { $$ = new_nterm ("=(%s,%s)", ]$[1, ]$[3, 0); }
; ;
decl : TYPENAME declarator ';' decl : TYPENAME declarator ';'
{ $$ = new_nterm ("<declare>(%s,%s)", ]$[1, ]$[2, 0); } { $$ = new_nterm ("<declare>(%s,%s)", ]$[1, ]$[2, 0); }
| TYPENAME declarator '=' expr ';' | TYPENAME declarator '=' expr ';'
{ $$ = new_nterm ("<init-declare>(%s,%s,%s)", ]$[1, { $$ = new_nterm ("<init-declare>(%s,%s,%s)", ]$[1,
]$[2, ]$[4); } ]$[2, ]$[4); }
; ;
declarator : ID declarator : ID
@@ -200,13 +200,13 @@ yylex (LEX_PARAMETERS)
ungetc (c, stdin); ungetc (c, stdin);
buffer[i++] = 0; buffer[i++] = 0;
tok = isupper ((unsigned char) buffer[0]) ? TYPENAME : ID; tok = isupper ((unsigned char) buffer[0]) ? TYPENAME : ID;
yylval = new_term (strcpy ((char *) malloc (i), buffer)); yylval = new_term (strcpy ((char *) malloc (i), buffer));
} }
else else
{ {
colNum += 1; colNum += 1;
tok = c; tok = c;
yylval = 0; yylval = 0;
} }
#if YYLSP_NEEDED #if YYLSP_NEEDED
yylloc.last_column = colNum-1; yylloc.last_column = colNum-1;
@@ -232,18 +232,18 @@ static Node *
new_nterm (char const *form, Node *child0, Node *child1, Node *child2) new_nterm (char const *form, Node *child0, Node *child1, Node *child2)
{ {
Node *node = (Node *) malloc (sizeof (Node)); Node *node = (Node *) malloc (sizeof (Node));
node->nterm.type = 1; node->nterm.isNterm = 1;
node->nterm.parents = 0; node->nterm.parents = 0;
node->nterm.form = form; node->nterm.form = form;
node->nterm.children[0] = child0; node->nterm.children[0] = child0;
if (child0) if (child0)
child0->node_info.parents += 1; child0->nodeInfo.parents += 1;
node->nterm.children[1] = child1; node->nterm.children[1] = child1;
if (child1) if (child1)
child1->node_info.parents += 1; child1->nodeInfo.parents += 1;
node->nterm.children[2] = child2; node->nterm.children[2] = child2;
if (child2) if (child2)
child2->node_info.parents += 1; child2->nodeInfo.parents += 1;
return node; return node;
} }
@@ -251,7 +251,7 @@ static Node *
new_term (char *text) new_term (char *text)
{ {
Node *node = (Node *) malloc (sizeof (Node)); Node *node = (Node *) malloc (sizeof (Node));
node->term.type = 0; node->term.isNterm = 0;
node->term.parents = 0; node->term.parents = 0;
node->term.text = text; node->term.text = text;
return node; return node;
@@ -262,11 +262,11 @@ free_node (Node *node)
{ {
if (!node) if (!node)
return; return;
node->node_info.parents -= 1; node->nodeInfo.parents -= 1;
/* Free only if 0 (last parent) or -1 (no parents). */ /* Free only if 0 (last parent) or -1 (no parents). */
if (node->node_info.parents > 0) if (node->nodeInfo.parents > 0)
return; return;
if (node->node_info.type == 1) if (node->nodeInfo.isNterm == 1)
{ {
free_node (node->nterm.children[0]); free_node (node->nterm.children[0]);
free_node (node->nterm.children[1]); free_node (node->nterm.children[1]);
@@ -289,7 +289,7 @@ node_to_string (Node *node)
buffer = (char *) malloc (1); buffer = (char *) malloc (1);
buffer[0] = 0; buffer[0] = 0;
} }
else if (node->node_info.type == 1) else if (node->nodeInfo.isNterm == 1)
{ {
child0 = node_to_string (node->nterm.children[0]); child0 = node_to_string (node->nterm.children[0]);
child1 = node_to_string (node->nterm.children[1]); child1 = node_to_string (node->nterm.children[1]);
@@ -409,61 +409,61 @@ m4_define([_AT_VERBOSE_GLR_STDERR],
AT_SETUP([GLR: Resolve ambiguity, impure, no locations]) AT_SETUP([GLR: Resolve ambiguity, impure, no locations])
_AT_TEST_GLR_CXXTYPES([], _AT_TEST_GLR_CXXTYPES([],
[%dprec 1], [%dprec 2]) [%dprec 1], [%dprec 2])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_RESOLVED_GLR_OUTPUT, _AT_GLR_STDERR) _AT_RESOLVED_GLR_OUTPUT, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Resolve ambiguity, impure, locations]) AT_SETUP([GLR: Resolve ambiguity, impure, locations])
_AT_TEST_GLR_CXXTYPES([%locations],[%dprec 1],[%dprec 2]) _AT_TEST_GLR_CXXTYPES([%locations],[%dprec 1],[%dprec 2])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR) _AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Resolve ambiguity, pure, no locations]) AT_SETUP([GLR: Resolve ambiguity, pure, no locations])
_AT_TEST_GLR_CXXTYPES([%pure-parser], _AT_TEST_GLR_CXXTYPES([%pure-parser],
[%dprec 1], [%dprec 2]) [%dprec 1], [%dprec 2])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_RESOLVED_GLR_OUTPUT, _AT_GLR_STDERR) _AT_RESOLVED_GLR_OUTPUT, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Resolve ambiguity, pure, locations]) AT_SETUP([GLR: Resolve ambiguity, pure, locations])
_AT_TEST_GLR_CXXTYPES([%pure-parser %locations], _AT_TEST_GLR_CXXTYPES([%pure-parser %locations],
[%dprec 1], [%dprec 2]) [%dprec 1], [%dprec 2])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR) _AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Merge conflicting parses, impure, no locations]) AT_SETUP([GLR: Merge conflicting parses, impure, no locations])
_AT_TEST_GLR_CXXTYPES([], _AT_TEST_GLR_CXXTYPES([],
[%merge <stmtMerge>], [%merge <stmtMerge>]) [%merge <stmtMerge>], [%merge <stmtMerge>])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_AMBIG_GLR_OUTPUT, _AT_GLR_STDERR) _AT_AMBIG_GLR_OUTPUT, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Merge conflicting parses, impure, locations]) AT_SETUP([GLR: Merge conflicting parses, impure, locations])
_AT_TEST_GLR_CXXTYPES([%locations], _AT_TEST_GLR_CXXTYPES([%locations],
[%merge <stmtMerge>], [%merge <stmtMerge>]) [%merge <stmtMerge>], [%merge <stmtMerge>])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR) _AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Merge conflicting parses, pure, no locations]) AT_SETUP([GLR: Merge conflicting parses, pure, no locations])
_AT_TEST_GLR_CXXTYPES([%pure-parser], _AT_TEST_GLR_CXXTYPES([%pure-parser],
[%merge <stmtMerge>], [%merge <stmtMerge>]) [%merge <stmtMerge>], [%merge <stmtMerge>])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_AMBIG_GLR_OUTPUT, _AT_GLR_STDERR) _AT_AMBIG_GLR_OUTPUT, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Merge conflicting parses, pure, locations]) AT_SETUP([GLR: Merge conflicting parses, pure, locations])
_AT_TEST_GLR_CXXTYPES([%pure-parser %locations], _AT_TEST_GLR_CXXTYPES([%pure-parser %locations],
[%merge <stmtMerge>],[%merge <stmtMerge>]) [%merge <stmtMerge>],[%merge <stmtMerge>])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR) _AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
AT_CLEANUP AT_CLEANUP
AT_SETUP([GLR: Verbose messages, resolve ambiguity, impure, no locations]) AT_SETUP([GLR: Verbose messages, resolve ambiguity, impure, no locations])
_AT_TEST_GLR_CXXTYPES([%error-verbose], _AT_TEST_GLR_CXXTYPES([%error-verbose],
[%merge <stmtMerge>], [%merge <stmtMerge>]) [%merge <stmtMerge>], [%merge <stmtMerge>])
AT_PARSER_CHECK([[./types test-input]], 0, AT_PARSER_CHECK([[./types test-input]], 0,
_AT_AMBIG_GLR_OUTPUT, _AT_VERBOSE_GLR_STDERR) _AT_AMBIG_GLR_OUTPUT, _AT_VERBOSE_GLR_STDERR)
AT_CLEANUP AT_CLEANUP