aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:36:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:36:50 +0000
commitfcb4ab8d1c917b3f2a998f9b6eab3d9cec27670a (patch)
treef94a42b5400218606fa453b284c3a3fc9be88102 /parse.y
parent4f096964968b9671a2fd43d1054e77eda0630ac7 (diff)
downloadruby-fcb4ab8d1c917b3f2a998f9b6eab3d9cec27670a.tar.gz
ytab.sed: for bison 2
* tool/ytab.sed: substitute `fprintf`s used directory in yy_reduce_print by bison 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 9c3e5f9602..c67e0fcca2 100644
--- a/parse.y
+++ b/parse.y
@@ -45,6 +45,12 @@
#define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
#define YYFREE(ptr) rb_parser_free(parser, (ptr))
#define YYFPRINTF rb_parser_printf
+#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ rb_parser_printf(parser, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+#endif
#undef malloc
#undef realloc
#undef calloc