summaryrefslogtreecommitdiff
path: root/srcpos.h
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2007-03-28 17:05:33 -0500
committerJon Loeliger <jdl@freescale.com>2007-03-28 17:07:44 -0500
commitce34ae3b238c562a215df0dddea56da866f16c0f (patch)
tree1263ea26cd37dca1625c5533607b0d13b900d554 /srcpos.h
parente45e6fd274826991c2b7e01fde4d73110487e0e0 (diff)
downloaddtc-ce34ae3b238c562a215df0dddea56da866f16c0f.tar.gz
DTC: Incorporate some review suggestions.
- Change include syntax to: /include/ "filename" - Move private functions directly into dtc-lexer.l - Define YYID for some older parser templates Also fix a #include ordering problem around YYLTPE. Signed-off-by; Jon Loeliger <jdl@freescale.com> Acked-by: Haiying Wang <Haiying.Wang@freescale.com>
Diffstat (limited to 'srcpos.h')
-rw-r--r--srcpos.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/srcpos.h b/srcpos.h
index d591e7e..bc5b525 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -22,7 +22,7 @@
* array of all opened filenames.
*/
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED)
typedef struct YYLTYPE {
int first_line;
int first_column;
@@ -35,6 +35,10 @@ typedef struct YYLTYPE {
#define YYLTYPE_IS_TRIVIAL 1
#endif
+/* Cater to old parser templates. */
+#ifndef YYID
+#define YYID(n) (n)
+#endif
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
@@ -68,4 +72,3 @@ extern FILE *dtc_open_file(const char *fname);
extern int lookup_file_name(const char *fname, int add_it);
extern const char *srcpos_filename_for_num(int filenum);
const char *srcpos_get_filename(void);
-