[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overriding the filter method



Steve Kelem wrote:
>...Do I set
> keyword1 = token; id = null; ?

Why don't you read chapter 4.6 (http://www.sable.mcgill.ca/sablecc/thesis.html#PAGE37).

Here's the short answer:

... filter()
{
  ...
  if(...)
  {
    ...
    token = new TKeyword1(token.getLine(), token.getColumn());
  }
...
}


Or something like this.  I haven't tried to compile this, so there may be some errors.  I hope you
get the idea though.

Etienne
-- 
----------------------------------------------------------------------
Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/
----------------------------------------------------------------------