mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
Modification of lexer and parser, improving dtc portability.
This mod allows successful build of dtc using both bison/flex and yacc/lex. Signed-off-by: Lukasz Wojcik <zbr@semihalf.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c6225f86fd
commit
5c8d2e2b57
2 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ LINECOMMENT "//".*\n
|
||||||
#include "srcpos.h"
|
#include "srcpos.h"
|
||||||
#include "dtc-parser.tab.h"
|
#include "dtc-parser.tab.h"
|
||||||
|
|
||||||
|
YYLTYPE yylloc;
|
||||||
|
|
||||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||||
#define YY_USER_ACTION \
|
#define YY_USER_ACTION \
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
* USA
|
* USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%locations
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "dtc.h"
|
#include "dtc.h"
|
||||||
#include "srcpos.h"
|
#include "srcpos.h"
|
||||||
|
|
||||||
|
YYLTYPE yylloc;
|
||||||
|
|
||||||
extern int yylex(void);
|
extern int yylex(void);
|
||||||
extern void yyerror(char const *s);
|
extern void yyerror(char const *s);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue