From: Lukasz Wojcik <zbr-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: [PATCH] Modification of lexer and parser, improving dtc portability.
Date: Tue, 12 Jan 2010 14:57:33 +0100 [thread overview]
Message-ID: <1263304653-71750-1-git-send-email-zbr@semihalf.com> (raw)
This mod allows successful build of dtc using both bison/flex and yacc/lex.
---
dtc-lexer.l | 2 ++
dtc-parser.y | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dtc-lexer.l b/dtc-lexer.l
index d142de5..96c2fce 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -38,6 +38,8 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
+YYLTYPE yylloc;
+
#define YY_USER_ACTION \
{ \
yylloc.file = srcpos_file; \
diff --git a/dtc-parser.y b/dtc-parser.y
index 31c14d7..4411aed 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -18,7 +18,6 @@
* USA
*/
-%locations
%{
#include <stdio.h>
@@ -26,6 +25,8 @@
#include "dtc.h"
#include "srcpos.h"
+YYLTYPE yylloc;
+
extern int yylex(void);
extern void yyerror(char const *s);
--
1.6.3.1
next reply other threads:[~2010-01-12 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 13:57 Lukasz Wojcik [this message]
[not found] ` <1263304653-71750-1-git-send-email-zbr-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
2010-01-26 23:11 ` [PATCH] Modification of lexer and parser, improving dtc portability David Gibson
-- strict thread matches above, loose matches on Subject: below --
2010-01-29 16:31 Lukasz Wojcik
[not found] ` <1264782711-52086-1-git-send-email-zbr-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
2010-02-01 4:46 ` David Gibson
2010-02-04 9:42 ` Lukasz Wojcik
[not found] ` <4B6A9683.300-nYOzD4b6Jr9Wk0Htik3J/w@public.gmane.org>
2010-02-08 8:13 ` David Gibson
2010-02-08 8:13 ` David Gibson
2010-02-08 15:31 ` Jon Loeliger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263304653-71750-1-git-send-email-zbr@semihalf.com \
--to=zbr-nyozd4b6jr9wk0htik3j/w@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox