[PATCH] DTC: Add support for a C-like #include "file" mechanism.

Jon Loeliger jdl at freescale.com
Fri Mar 30 02:02:48 EST 2007


On Wed, 2007-03-28 at 21:07, David Gibson wrote:

> > > > +<INCLUDE>\"[^"\n]*\"	{
> > > > +			yytext[strlen(yytext) - 1] = 0;
> > > > +			if (!push_input_file(yytext + 1)) {
> > > > +				/* Some unrecoverable error.*/
> > > 
> > > Should be some kind of error message here.
> > 
> > Hrm.  Yeah.

So I looked, and all the return 0 cases issue specific
errors before returning, so that happens already.


> > Well, it has to come early so that the type is seen
> > prior to the builtin version.  But it could be reorganized
> > a bit, I suppose.  I was just angling on not cluttering
> > up the lexer proper.
> 
> Err... builtin version of what?

I forgot I already separated out the YYLTYPE definition
to handle this issue.  Never mind; it's kosher already.


> > Note some people are seeing some compilation problems
> > around the struct field "filenum" that I introduced.
> > I don't see that problem, but a coworker here does,
> > so I am now able to reproduce the issue and am working
> > on a fix. Sorry.
> 
> Hrm.  Which struct did you add the field to?

And the patch I applied yesterday fixed this YYLTYPE up too.

jdl





More information about the Linuxppc-dev mailing list