-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- ((Current).first_line = (Rhs)[1].first_line, \
- (Current).first_column = (Rhs)[1].first_column, \
- (Current).last_line = (Rhs)[N].last_line, \
- (Current).last_column = (Rhs)[N].last_column)
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+do { \
+ if (N) \
+ { \
+ (Current).first_line = (Rhs)[1].first_line; \
+ (Current).first_column = (Rhs)[1].first_column; \
+ (Current).last_line = (Rhs)[N].last_line; \
+ (Current).last_column = (Rhs)[N].last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = (Rhs)[0].last_line; \
+ (Current).first_column = (Current).last_column = (Rhs)[0].last_column; \
+ } \
+} while(0)