blob: 625786255f46f982702c5e1dcccaf9b02cdbcdf5 [file] [log] [blame]
Doug Zongkerd9c9d102009-06-12 12:24:39 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _YYDEFS_H_
18#define _YYDEFS_H_
19
20#define YYLTYPE YYLTYPE
21typedef struct {
22 int start, end;
23} YYLTYPE;
24
25#define YYLLOC_DEFAULT(Current, Rhs, N) \
26 do { \
27 if (N) { \
28 (Current).start = YYRHSLOC(Rhs, 1).start; \
29 (Current).end = YYRHSLOC(Rhs, N).end; \
30 } else { \
31 (Current).start = YYRHSLOC(Rhs, 0).start; \
32 (Current).end = YYRHSLOC(Rhs, 0).end; \
33 } \
34 } while (0)
35
36#endif