aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'edify/yydefs.h')
-rw-r--r--edify/yydefs.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/edify/yydefs.h b/edify/yydefs.h
new file mode 100644
index 00000000..62578625
--- /dev/null
+++ b/edify/yydefs.h
@@ -0,0 +1,36 @@
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
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