diff options
author | Jon Loeliger <jdl@freescale.com> | 2007-03-28 17:05:33 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-03-28 17:07:44 -0500 |
commit | ce34ae3b238c562a215df0dddea56da866f16c0f (patch) | |
tree | 1263ea26cd37dca1625c5533607b0d13b900d554 /srcpos.h | |
parent | e45e6fd274826991c2b7e01fde4d73110487e0e0 (diff) | |
download | dtc-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.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); - |