SimpleNode class missing childrenAccept method

View: New views
3 Messages — Rating Filter:   Alert me  

SimpleNode class missing childrenAccept method

by Christoph Leuzinger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm building a parser using JJTree and following Tom Copeland's book in
the process. The book shows an example visitor adapter class where all
visit() methods are calling a method called childrenAccept() on the
SimpleNode passed to the visit() method, e. g.:

public Object visit(SimpleNode node, Object data) {
  return node.childrenAccept(this, data);
}

However, there is no such method in the SimpleNode class generated by
JJTree. Is this a custom method or do I have to set an option for it to
be generated?

I'm using the Eclipse JavaCC plugin v1.5.10 which in turn contains
JavaCC v4.0.

Thanks in advance,
  Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: SimpleNode class missing childrenAccept method

by Christoph Leuzinger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 9 Jul 2008 12:29:33 +0200
Christoph Leuzinger <christoph.leuzinger@...> wrote:

> However, there is no such method in the SimpleNode class generated by
> JJTree. Is this a custom method or do I have to set an option for it
> to be generated?

Well, nevermind. I just got past this problem by deleting the Node
interface and the SimpleNode class. The newly generated files now
contain the missing method.

Seems like I have been using stale files from a JJTree run that had
the VISITOR option disabled.

Sorry about the noise,
  Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: SimpleNode class missing childrenAccept method

by Laughing Man :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
>
> Well, nevermind. I just got past this problem by deleting the Node
> interface and the SimpleNode class. The newly generated files now
> contain the missing method.
>
> Seems like I have been using stale files from a JJTree run that had
> the VISITOR option disabled.
>
> Sorry about the noise,
> Christoph

Hey, we've all done something like this some time :P No worries.


Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!
LightInTheBox - Buy quality products at wholesale price