caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Tews <H.Tews@cs.ru.nl>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] using different lexers with one parser?
Date: Thu, 19 Apr 2007 09:42:22 +0200	[thread overview]
Message-ID: <wwu4pnclsip.fsf@tandem.cs.ru.nl> (raw)
In-Reply-To: <1176906070.15945.39.camel@rosella.wigram> (skaller@users.sourceforge.net's message of "Thu, 19 Apr 2007 00:21:10 +1000")

skaller <skaller@users.sourceforge.net> writes:

   This leaves the problem of the lookahead token, which
   may or may not exist. You can predict whether it exists
   for each reduction. You can do this 'mentally' by asking
   "Does this production have a definite set of terminators,
   (no lookahead) or does it rely on bumping 
   into something unrecognizable (lookahead)"?

I believe that in the grammar.output file you can pretty easy
see, which rules require a lookahead token. A state with two
reduce rules or one shift and one reduce rules obviously needs a
lookahead token. You would have to check that those reductions
that change the lexer are done in a state with precisely one
reduction. Of course you would have to do that every time you
change the grammar... 

Bye,

Hendrik


      reply	other threads:[~2007-04-19  7:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-17 20:33 Oliver Bandel
2007-04-18  7:38 ` [Caml-list] " Hendrik Tews
2007-04-18 10:01   ` Oliver Bandel
2007-04-18 14:21     ` skaller
2007-04-19  7:42       ` Hendrik Tews [this message]

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=wwu4pnclsip.fsf@tandem.cs.ru.nl \
    --to=h.tews@cs.ru.nl \
    --cc=caml-list@yquem.inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).