From: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamllex+ocamlyacc and not parsing properly
Date: Mon, 8 Aug 2005 14:17:51 +1200 [thread overview]
Message-ID: <ad8cfe7e0508071917d4d57f9@mail.gmail.com> (raw)
In-Reply-To: <200508080058.12357.jon@ffconsultancy.com>
> So you're lexer is emitting the tokens str, com, str, com, str, eol but your
> parser looks as though it is expecting str, com, str, str, str, eol.
>
> I'm guessing the error is in the lexer because the grammar in the parser is
> very simple. So ":Sovereign.Wyldryde.org" is lexed by "message" into str, " "
> then invokes "command" which parses 254 into com, " " then invokes "param"
> which parses "dst" into str, "param" then invokes the remaining into strs.
>
> However, that can't be correct because the lexer has clearly gone back into
> "command" in order to emit "Irc_types.Numeric 112".
>
> It's just a guess, but have you assumed that each time the lexer is invoked by
> the parser that it starts in the rule it was left in when, in fact, the
> parser invokes the "message" rule every time?
Yes, I assume it continues lexing where it left off. If this is not
the case, what's the best way to do conditional parsing??
Jonathan
next prev parent reply other threads:[~2005-08-08 2:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-07 21:39 Jonathan Roewen
2005-08-07 21:54 ` Jonathan Roewen
2005-08-07 23:58 ` Jon Harrop
2005-08-08 2:17 ` Jonathan Roewen [this message]
2005-08-08 4:23 ` Jonathan Roewen
2005-08-08 5:03 ` Jonathan Roewen
2005-08-08 6:39 ` Jon Harrop
2005-08-08 6:47 ` Jonathan Roewen
2005-08-08 8:59 ` skaller
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=ad8cfe7e0508071917d4d57f9@mail.gmail.com \
--to=jonathan.roewen@gmail.com \
--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