mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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:
parent
e45e6fd274
commit
ce34ae3b23
3 changed files with 113 additions and 143 deletions
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue