[TCS] Context and leaveContext [message #618] |
Tue, 19 February 2008 04:08  |
Eclipse User |
|
|
|
Hi,
I noticed in generated ANTLR3 grammars, that certain elements look like
this:
name ...
: ...
{
ei.leaveContext(false);
}
;
now the leaveContextmethod looks like this:
public void leaveContext(boolean leave) {
if(leave) currentContext = currentContext.parent();
}
So I cannot see the point of calling leaveContext with false. So I wonder,
what is the reason for this (Or is it something historical)?
regards,
Thibault
|
|
|
Re: [TCS] Context and leaveContext [message #642 is a reply to message #618] |
Tue, 19 February 2008 12:34  |
Eclipse User |
|
|
|
Hello,
> I noticed in generated ANTLR3 grammars, that certain elements look like
> this:
> name ...
> : ...
> { ei.leaveContext(false);
> }
> ;
>
> now the leaveContextmethod looks like this:
>
> public void leaveContext(boolean leave) {
> if(leave) currentContext = currentContext.parent();
> }
>
> So I cannot see the point of calling leaveContext with false. So I
> wonder, what is the reason for this (Or is it something historical)?
It is something historical ;-).
Regards,
Frédéric Jouault
|
|
|
Powered by
FUDForum. Page generated in 0.02553 seconds