Hi, thanks for the replies. I think I'm understanding now that I don't need to wrap everything with EXPANDTAG. It also seems that my nested lists issue is something that should probably be taken care of at the grammar or semantic-tag-expand-function level.
Is there anywhere in the manual that show what a correctly parsed file should look like? I've been basing my grammar off of the wisent-java.wy file, but it would be great to see exactly how the result should be structured.
On Mon Aug 07 09:21 , David PONCE wrote:
> Sorry for the delay, I was in vacation.
> > I think David Ponce is best able to answer specifics about
> > EXPANDTAG.
> > Going from a parser action into a tag is a long process. First you
> > need one of the create macros. This just puts the basics together
> > that you specify.
> > To make a tag show up in the parser's end result (a list of tags),
> > the tag needs to be expanded (for compound tags), and it needs to be
> > cooked (a reparse symbol given for the incremental parser.) I think
> > that's what EXPANDTAG does.
> > It also needs positional information (for the overlays and tracking
> > system.) and it needs to be pushed into the tg stack. I don't recall
> > where that happens.
> > If you want to create a mock tag and put it into some other tags
> > attribute data, then you would not need to expand it.
> > I think your nested list issue may be a result of needing a
> > `semantic-tag-expand-function', or altering the one you have. See the
> > variable of the same name.
> > If I am incorrect, hopefully David can provide better advice.
> Shortly, EXPANDTAG should be used to perform explicit tag expansion
> from within a semantic action in Bison style grammar which don't
> recursively call the high level iterative parser through the
> EXPANDFULL macro to expand compound tags.
> There are more details in the wisent manual in the "How to use Wisent
> with Semantic" chapter, section "Grammar styles".
> Hope it will help.
Pet Tomato, Inc.