cpptools.preprocessor
Class Macro

java.lang.Object
  extended by cpptools.preprocessor.AbstractTokenFilter
      extended by cpptools.preprocessor.Macro
All Implemented Interfaces:
TokenFilter

public final class Macro
extends AbstractTokenFilter

Manages macro pre-processing.

Author:
Mathieu Champlon

Constructor Summary
Macro(TokenProvider provider, java.util.Stack<Token> buffer, java.lang.String name, java.lang.String value)
          Create a macro.
 
Method Summary
 boolean process(Token token)
          Trigger filtering based on a given token.
 
Methods inherited from class cpptools.preprocessor.AbstractTokenFilter
insert, matches, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Macro

public Macro(TokenProvider provider,
             java.util.Stack<Token> buffer,
             java.lang.String name,
             java.lang.String value)
Create a macro.

Parameters:
provider - the token provider to retrieve subsequent tokens
buffer - the token stack where to output filtered tokens
name - the define symbol
value - the define value
Method Detail

process

public boolean process(Token token)
Trigger filtering based on a given token.

Parameters:
token - the head of the token flow
Returns:
whether the filter has been applied or not


Copyright © 2006-2007 null. All Rights Reserved.