summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-07-23 23:03:00 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-07-23 23:03:00 +0000
commitd17755ef49eeef07206bc0fe7c7dcf10b2ffc34e (patch)
tree933616719fb71fa2f43c164e6ff2dd89accc4fa3
parentd28ff2ed0ee67a631b3052581831ed623b8812d6 (diff)
pour que ca marche mieux avec -dtypes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--yacc/reader.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/yacc/reader.c b/yacc/reader.c
index f7847f9e9..5ab9997d6 100644
--- a/yacc/reader.c
+++ b/yacc/reader.c
@@ -1233,9 +1233,10 @@ void copy_action(void)
else
fprintf(f, "(peek_val parser_env %d : '%s) in\n", n - i, item->name);
}
- fprintf(f, " Obj.repr((\n");
+ fprintf(f, " Obj.repr(\n");
fprintf(f, line_format, lineno, input_file_name);
- for (i = cptr - line; i >= 0; i--) fputc(' ', f);
+ for (i = 0; i < cptr - line; i++) fputc(' ', f);
+ fputc ('(', f);
depth = 1;
cptr++;
@@ -1268,15 +1269,15 @@ loop:
goto loop;
}
if (c == '}' && depth == 1) {
- fprintf(f, "\n# 0\n ");
+ fprintf(f, ")\n# 0\n ");
cptr++;
tagres = plhs[nrules]->tag;
if (tagres)
- fprintf(f, ") : %s))\n", tagres);
+ fprintf(f, " : %s))\n", tagres);
else if (sflag)
- fprintf(f, ")))\n");
+ fprintf(f, "))\n");
else
- fprintf(f, ") : '%s))\n", plhs[nrules]->name);
+ fprintf(f, " : '%s))\n", plhs[nrules]->name);
if (sflag)
fprintf(f, "\n");
return;