org.jsesoft.jpp
Class MacroIncludeAssembler

java.lang.Object
  |
  +--sjm.parse.Assembler
        |
        +--org.jsesoft.jpp.MacroIncludeAssembler

public class MacroIncludeAssembler
extends Assembler

An assembler for #include.

Version:
1.0
Author:
JSESoft

Field Summary
protected  Token fence
           
 
Constructor Summary
MacroIncludeAssembler()
           
 
Method Summary
protected  boolean expand(java.util.Vector call, java.util.Vector header, java.util.Vector body, java.util.Vector expansion)
          Includes a macro call.
protected  boolean expandArg(Token identifier, java.util.Vector call, java.util.Vector header, java.util.Vector expansion)
          Includes a macro argument.
 void workOn(Assembly assembly)
          This is the one method all subclasses must implement.
 
Methods inherited from class sjm.parse.Assembler
elementsAbove
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fence

protected final Token fence
Constructor Detail

MacroIncludeAssembler

public MacroIncludeAssembler()
Method Detail

workOn

public void workOn(Assembly assembly)
Description copied from class: Assembler
This is the one method all subclasses must implement. It specifies what to do when a parser successfully matches against a assembly.
Overrides:
workOn in class Assembler
Following copied from class: sjm.parse.Assembler
Parameters:
Assembly - the assembly to work on

expand

protected boolean expand(java.util.Vector call,
                         java.util.Vector header,
                         java.util.Vector body,
                         java.util.Vector expansion)
Includes a macro call.
Parameters:
call - the macro call
header - the macro header
body - the identifier to expand
expansion - the expansion
Returns:
true if expansion

expandArg

protected boolean expandArg(Token identifier,
                            java.util.Vector call,
                            java.util.Vector header,
                            java.util.Vector expansion)
Includes a macro argument.
Parameters:
identifier - the identifier to expand
call - the macro call
header - the macro header
expansion - the expansion
Returns:
true if macro call found