1 /*
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
21 typedef 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 int yylex();
37 
38 #endif
39