summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc28638)
* data/glr.c, src/graphviz.h, src/ielr.c, src/scan-gram.l,
* src/system.h, tests/actions.at, tests/glr-regression.at: Do not
use // comments.
Do not introduce variables after statements.
Provide "main" with a return value.
Warnings about uninitialized yylloc in yyparse have been fixed.
Warnings about uninitialized yylloc in yyparse have been fixed.
+ Restored C90 compliance (yet no report was ever made).
+
** Diagnostics are improved
*** Changes in the format of error messages
** Diagnostics are improved
*** Changes in the format of error messages
# include <setjmp.h>
# define YYJMP_BUF jmp_buf
# define YYSETJMP(Env) setjmp (Env)
# include <setjmp.h>
# define YYJMP_BUF jmp_buf
# define YYSETJMP(Env) setjmp (Env)
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
#endif
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
#endif
#if ! YYERROR_VERBOSE
yyerror (]b4_lyyerror_args[YY_("syntax error"));
#else
#if ! YYERROR_VERBOSE
yyerror (]b4_lyyerror_args[YY_("syntax error"));
#else
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
size_t yysize = yysize0;
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
size_t yysize = yysize0;
yyerror (]b4_lyyerror_args[YY_("syntax error"));
yyMemoryExhausted (yystackp);
}
yyerror (]b4_lyyerror_args[YY_("syntax error"));
yyMemoryExhausted (yystackp);
}
#endif /* YYERROR_VERBOSE */
yynerrs += 1;
}
#endif /* YYERROR_VERBOSE */
yynerrs += 1;
}
-/// Begin a Dot graph.
-/// \param fout output stream.
+/** Begin a Dot graph.
+ *
+ * \param fout output stream.
+ */
void start_graph (FILE *fout);
void start_graph (FILE *fout);
-/// Output a Dot node.
-/// \param id identifier of the node
-/// \param label human readable label of the node (no Dot escaping needed).
-/// \param fout output stream.
+/** Output a Dot node.
+ *
+ * \param id identifier of the node
+ * \param label human readable label of the node (no Dot escaping needed).
+ * \param fout output stream.
+ */
void output_node (int id, char const *label, FILE *fout);
void output_node (int id, char const *label, FILE *fout);
-/// Output a Dot edge.
-/// \param source id of the source node
-/// \param destination id of the target node
-/// \param label human readable label of the edge
-/// (no Dot escaping needed). Can be 0.
-/// \param style Dot style of the edge (e.g., "dotted" or "solid").
-/// \param fout output stream.
+/** Output a Dot edge.
+ * \param source id of the source node
+ * \param destination id of the target node
+ * \param label human readable label of the edge
+ * (no Dot escaping needed). Can be 0.
+ * \param style Dot style of the edge (e.g., "dotted" or "solid").
+ * \param fout output stream.
+ */
void output_edge (int source, int destination, char const *label,
char const *style, FILE *fout);
void output_edge (int source, int destination, char const *label,
char const *style, FILE *fout);
-/// Output a reduction.
-/// \param s current state
-/// \param reds the set of reductions
-/// \param fout output stream.
+/** Output a reduction.
+ * \param s current state
+ * \param reds the set of reductions
+ * \param fout output stream.
+ */
void output_red (state const *s, reductions const *reds, FILE *fout);
void output_red (state const *s, reductions const *reds, FILE *fout);
-/// End a Dot graph.
-/// \param fout output stream.
+/** End a Dot graph.
+ *
+ * \param fout output stream.
+ */
void finish_graph (FILE *fout);
void finish_graph (FILE *fout);
-/// Escape a lookahead token.
-/// \param name the token.
+/** Escape a lookahead token.
+ *
+ * \param name the token.
+ */
char const *escape (char const *name);
#endif /* ! GRAPHVIZ_H_ */
char const *escape (char const *name);
#endif /* ! GRAPHVIZ_H_ */
if (!bitset_empty_p (lookaheads[i]))
break;
}
if (!bitset_empty_p (lookaheads[i]))
break;
}
- // bitset_equal_p uses the size of the first argument, so
- // lookaheads[i] must be the second argument.
+ /* bitset_equal_p uses the size of the first argument,
+ so lookaheads[i] must be the second argument. */
else if (!bitset_equal_p ((*this_isocorep)->lookaheads[i],
lookaheads[i]))
break;
else if (!bitset_equal_p ((*this_isocorep)->lookaheads[i],
lookaheads[i]))
break;
free (to_state);
if (lr_type == LR_TYPE__CANONICAL_LR)
{
free (to_state);
if (lr_type == LR_TYPE__CANONICAL_LR)
{
- // Reduction lookaheads are computed in ielr_split_states above but are
- // timed as part of phase 4.
+ /* Reduction lookaheads are computed in ielr_split_states above
+ but are timed as part of phase 4. */
loc.start = start;
loc.end = scanner_cursor;
token_end = quote (token_end);
loc.start = start;
loc.end = scanner_cursor;
token_end = quote (token_end);
- // Instead of '\'', display "'".
+ /* Instead of '\'', display "'". */
if (!strcmp (token_end, "'\\''"))
token_end = "\"'\"";
complain_at (loc, _(msgid), token_end);
if (!strcmp (token_end, "'\\''"))
token_end = "\"'\"";
complain_at (loc, _(msgid), token_end);
typedef size_t uintptr_t;
# endif
typedef size_t uintptr_t;
# endif
# define EX_MISMATCH 63
/*---------.
# define EX_MISMATCH 63
/*---------.
%code
{
# include <stdio.h>
%code
{
# include <stdio.h>
-# include <stdlib.h> // getenv
+# include <stdlib.h> /* getenv */
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
%code
{
# include <stdio.h>
%code
{
# include <stdio.h>
-# include <stdlib.h> // getenv
+# include <stdlib.h> /* getenv */
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
TEST(7, 2, 0, 2);
TEST(8, 0, 8, 0);
TEST(7, 2, 0, 2);
TEST(8, 0, 8, 0);
int
main (int argc, char **argv)
{
int
main (int argc, char **argv)
{
input = stdin;
if (argc == 2 && !(input = fopen (argv[1], "r")))
return 3;
input = stdin;
if (argc == 2 && !(input = fopen (argv[1], "r")))
return 3;
if (argc == 2 && fclose (input))
return 4;
return res;
if (argc == 2 && fclose (input))
return 4;
return res;
int
main(int argc, char* argv[])
{
int
main(int argc, char* argv[])
{
input = stdin;
if (argc == 2 && !(input = fopen (argv[1], "r")))
return 3;
input = stdin;
if (argc == 2 && !(input = fopen (argv[1], "r")))
return 3;
if (argc == 2 && fclose (input))
return 4;
return res;
if (argc == 2 && fclose (input))
return 4;
return res;