[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interesting push parser use case
From: |
Joel E. Denny |
Subject: |
Re: interesting push parser use case |
Date: |
Sat, 8 Sep 2007 19:05:54 -0400 (EDT) |
On Sat, 8 Sep 2007, Bob Rossi wrote:
> The first issue is that I probably need a way to tell the parser that
> I'm done giving it tokens. That way, it will finish all of it's rules.
> Is there already a way to do this?
Yacc-generated parsers expect the last token in the input stream to be
token 0. In the .output file, it's called $end.
> The second issue is slightly more fuzzy. Essentially, after each token I
> give to the parser, it would probably be useful to know if it just
> finished a particular rule, and if so, which rule.
Could you use %parse-param to pass a pointer to a variable to be set by
the semantic action of that rule?