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>
This commit is contained in:
7
srcpos.h
7
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user