public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Jon Loeliger <jdl@jdl.com>
Subject: Re: [PATCH] DTC: Remove the need for the GLR Parser.
Date: Wed, 24 Oct 2007 09:37:43 +1000	[thread overview]
Message-ID: <20071023233743.GB10595@localhost.localdomain> (raw)
In-Reply-To: <cace68e0fe3e4e257b7c63d18c805f18@kernel.crashing.org>

On Tue, Oct 23, 2007 at 04:41:51PM +0200, Segher Boessenkool wrote:
> >>> Flip a right-recursive stack-abusing rule into a left-recursive
> >>> stack-friendly rule and clear up three messes in one shot: No more
> >>> conflicts, no need for the GLR parser, and friendlier stackness.
> >>
> >> Ouch.  I'm feeling a bit stupid now,
> >
> > Absolutely no need for that.
> 
> If you haven't had "exp := aexp | exp aexp" beaten into you with
> a big stick, maybe you should be happy about that ("'s got a nail
> in it!") :-)
> 
> >> And even without glr-parser, I'm still uncomfortable with the
> >> lexer<->parser execution ordering issues with the current
> >> /dts-version/ proposal.  It may now be true that the order is
> >> guaranteed to be correct, but it's still not exactly obvious.
> 
> If you require /dts-version/ (and similar global dtc-control stmts)
> to be at the start of the file, can't you avoid this ordering problem
> by starting to parse the file with a simple (hand-written) parser
> (which would handle these statements) and only when you cannot parse
> any more switch to the "normal" parser (which won't handle them)?
> Or is this a stupid suggestion :-)

Aieee, the pain!  No, please let's keep all the grammar information in
one place.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2007-10-23 23:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 21:13 [PATCH] DTC: Remove the need for the GLR Parser Jon Loeliger
2007-10-23  2:54 ` David Gibson
2007-10-23 14:24   ` Jon Loeliger
2007-10-23 14:41     ` Segher Boessenkool
2007-10-23 14:49       ` Jon Loeliger
2007-10-23 23:41         ` David Gibson
2007-10-23 23:37       ` David Gibson [this message]
2007-10-23 16:07     ` Jon Loeliger
2007-10-23 23:44       ` David Gibson
2007-10-24  1:11     ` David Gibson

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=20071023233743.GB10595@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=jdl@jdl.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=segher@kernel.crashing.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